Ns predicates support for queries

Opening a pull request for merging NSPredicate query support into Sync.
I think 'query' should be 'predicate'