Custom sorting of CBLQueryEnumerators

Added CBLQuery.sortDescriptors,
and -[CBLQueryEnumerator sortUsingDescriptors:].

Conflicts:
	Source/API/CBLQuery.m
Removed implicit key./value. prefix support in query sort descriptors.

Had second thoughts about this; too much "magic" for not enough benefit.
Fixed: Query.inclusiveEnd option was missing from public API

Fixes couchbaselabs/couchbase-lite-api#105
API CHANGE: Added CBLQuery.postFilter

Query results can now be post-processed by an NSPredicate that can
remove any rows its wants to.
Added query-filter support for reduced/grouped and full-text queries.
API CHANGE: Added CBLQuery.inclusiveStart property

Defaults to YES (compatible with existing behavior.)
In the REST API, it's a query param ?inclusive_start.
Fixes #405 asyncTaskCount out of sync in Puller

* The issue happens in the continous mode where there is a permanent error occurred. The asyncTaskCount was decreased unexpectedly as a result of the continous flag was reset while stopping the replication due to the permanent error.

* Fix the issue by getting the continous flag before setting the error which could trigger the replication to stop if the error is a permanent error.

* Add CBL_Puller_Continuous_PermanentError Test that reflects the fix.
Checked in current version of CBLQueryPlanner.
Add CBL iOS Test target to the CBLRouter_Tests
Query planner now precomputes startKey and endKey as NSExpressions at init time.

Mostly this improves testability, as unit tests can assert that those expressions are correct.
add logging of filter parameters for debugging
Query planner now supports case-insensitive string comparison

i.e. the "[c]" modifier on string comparison operators
Query planner handles "IN" expressions; other fixes

* For "expr IN $VALUES", emits expr as key and uses the CBLQuery.keys property with the runtime value of $VALUES.
* Fixed a bug where an expr could appear twice in the key if it were also given as a sort key.
* Made most of the class properties only appear in debug builds, to save code size.
Query planner: Simplify map block by precomputing a single expression for key and for value.
Fixes #405 Rework

Testing against ChangeTracker's continuous property instead of replicator._ continuous variable when syncing asyncTaskCount in CBL_Puller's startChangeTracker, changeTrackerStopped: and stop method.
More CBLQueryPlanner improvements

* Added convenience init that takes predicate as an NSString.
* Added -explanation method for troubleshooting & learning.
* Handle _queryKeys expression evaluating to an NSSet or NSDictionary.
Added postFilter support to all-docs queries.
all-docs query optimizations

* Don't look up attachments if rev's no_attachments column is true
* Get document contents if there's a filter, because it's almost certain to look at them.
Merge pull request #416 from couchbase/feature/issue_405

Fixes #405 asyncTaskCount out of sync in Puller
Add NS_REQUIRES_PROPERTY_DEFINITIONS declaration to CBLModel

This will catch a common bug where someone implementing a concrete
model class forgets to declare a document property as @dynamic.

The annotation will trigger a compiler warning in this situation, i.e.
whenever a subclass doesn't explicitly provide an @dynamic (or
@synthesize or accessor method) for a property it declares.