Ns predicates support for queries

Opening a pull request for merging NSPredicate query support into Sync.
same here: query -> predicate