function filterWithRules(rules, obj) {
  return filterWithRulesLoop(rules, obj);
}
Applies a rules object to filter a given object's structure.

The rules object should match the shape of the source object and should
have a truthy/falsey value indicating if a property should be included/
excluded.  If the filters do not contain a property that exists on the
source object then the respective property will be excluded.

@param  {Object} rules : The filter rules.
@param  {Object} obj   : The object to filter.

@return {Object}
  The filtered object.

@example
  filter(
    // rules
    {
      foo: { bar: true },
      poop: true
    },
    // source
    {
      foo: { bar: 'bar', qux: 'qux' },
      bob: 'bob',
      poop: { plop: 'splash' }
    },
  )