Implement allDatastores method

Implement allDatastores method on CDTDatastoreManager. Returns an
array of strings contain the name of datastores managed by this db
Merge pull request #102 from cloudant/42506_get_all_datastores

Implement listDatastores method
Creates test that currently crashes (Assert fails) when a local
database is deleted during a push and pull replication. This was
initially reported by a customer.
Fixes crash problem when local database pointer becomes nil during the
POST _rev_diffs stage of a push replication (see TDPusher -processInbox).
The test added in the previous commit reproduced this crash.

The TDReplicator -databaseWasDeleted and -databaseClosing are now queued
onto their own thread instead of running on the thread from which
they were called. This ensures proper functioning and ordering of
exectution steps when shutting down TDReplicators after either of these
events occur. It should fix a few bugs that crash, as reported by
users and seen by running tests.

A side-effect, however, is that when a database is deleted during
replication, a number of asynchronous operations are performed after
the database has been removed from local disk. This results in a
significatn number of error messages in the console produced by FMDB library.