add conditional :if and :unless logic to filters

+ followed the way conditional procs are built for Scopes
+ by way of Array.group_by, we now only recognize the last-defined
  `filter` call for each individual attribute
+ update the specs to allow `filter` to be called multiple times on
  the same pseudo-document
Merge pull request #1801 from Daxter/938-conditional-filters

[938] Conditional logic for filters