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.
Fix #310 Mutated sub model not being saved issue

* Add the code that checks for 'CBLJSONEncoding' protocol and assign
OnMutate block if the value implements 'setOnMutate' in the
'impForSetterOfProperty' method.
* Add 'API_SaveMutatedSubModel' test.
Fixes #336 Assertion Failed : _asyncTaskCount >= 0

The issue is that the result of the onCompletion block of the
CBLMultipartUploader could be null when there was an error occurred.
Hence passing the result object of the block to the removeRemoteRequest
method is not correct and will result to an error that the finished
uploader will not be removed from the remote request array.

When the app is suspended in the background, the replication (pusher)
will stop all of the requests that are in the remote request array.
Calling stop on the finished uploader will cause the onCompletion block
to be called again and will lead to the ‘Assertion Failed :
_asyncTaskCount >= 0’ error when asyncTasksFinished: method is invoked
inside the onCompletion block.

The fix is to use the original uploader object to pass to
removeRemoteRequest method instead of using the result object from the
onCompletion block.
Fixes Puller bugs that can cause asyncTaskCount out of sync

* Similar to the fix for #336 to the Pusher, ensure that we pass the
right request object to the removeRemoteRequest method inside the
OnCompletion block of the CBLMultipartDownloader and CBLBulkDownloader.

* Correct result type of the CBLBulkDownloader’s onCompletion block.

* Call removeRemoteRequest to remove the CBLBulkDownloader object
inside the onCompletion block.
Write a test case for #319
Fixes #319 overriding the response content-type

Setting the response content-type to 'application/json' when the
response has a body object but there is no content-type value given.
Merge pull request #404 from couchbase/feature/issue_310

Fix #310 Mutated sub model not being saved issue
Merge pull request #407 from couchbase/feature/issue_336

Fix #336 Assertion Failed : _asyncTaskCount >= 0
Merge pull request #412 from couchbase/feature/issue_319

Fixes #319 overriding the response content-type
Don't make internal symbols public, in the iOS static library

For #413
Fixed the targets so the test apps can still access+run the unit tests.

The debug builds of the static framework need to export all
symbols publicly so that the test apps can call the unit tests.

For #413
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.