Ns predicates support for queries

Opening a pull request for merging NSPredicate query support into Sync.
Yes, it does. Forgot to put that into the header.