Add NSPredicate query support to Cloudant Sync

This allows using an NSPredicate to generate the SQL for querying
over Cloudant Sync indexes, rather than using the dictionary
format. The dictionary format is left available, for those who
would rather use it.

The main NSPredicate to SQL processing happens in
CDTQueryBuilder, and CDTIndexManager has methods taking
NSPredicate objects added.
Merge pull request #57 from cloudant/NSPredicates-Support-For-Queries

Ns predicates support for queries
Modifies TDReplicator to report an error when a local database is deleted
during replication.

Error is propagated to CDTReplicator and reported by it's state.

Adds tests to ReplicationAcceptance project for CDTReplicatorState when
local database is deleted by a delegate during replication.