Improve Query and add support removing using a predicate

- Don't update if the model has been deleted
- Lump related changes together in QueryCount
- Support removing documents using a predicate
(Database.removeWithPredicate(type, predicate)