28738 query deleted documetns

If you delete a document, but don't update the indexes attached to the datastore, when a query finds that document it'll crash. This is because the CDTDatastore -allDocsQuery:options: method didn't check for deleted documents in the return value from TD_Database getDocsWithIDs:options: and handle them correctly.

The fix is:

- handle deleted documents in -allDocsQuery:options:.
- make sure the indexing code handles these documents correctly.
- add regression tests to make sure this doesn't happen again.