Fix #435 Missing the last group when there is no reduce

* Fix the bug in CBLView that the last entry is not included into the rows result when there is no reduce block given.

* Add CBL_View_Grouped_NoReduce to CBL_View_Tests.m.

* Add all missing CBLView Tests into TestCase(CBLView).
Fixed more unexported-symbol issues

Missed CBLHTTPErrorDomain (an NSString constant).
Also, I renamed the classes GCDAsyncSocket and WebSocket to have a "CBL_"
prefix but forgot to update them in the .exp file.
For some reason both of these mistakes only manifested as errors in the
Release build, not Debug -- I thought the symbol exporting would be the
same in both cases but apparently not.
Fixed a Release-only compile error in CBLQueryPlanner
Replication unit test tweaks

Added the self-signed X.509 cert (used by CBL_Puller_SSL test case) to
the project, and changed the way external test files are loaded to make
it work on iOS too.
Fixed more unexported-symbol issues

Missed CBLHTTPErrorDomain (an NSString constant).
Also, I renamed the classes GCDAsyncSocket and WebSocket to have a "CBL_"
prefix but forgot to update them in the .exp file.
For some reason both of these mistakes only manifested as errors in the
Release build, not Debug -- I thought the symbol exporting would be the
same in both cases but apparently not.
Fixed a Release-only compile error in CBLQueryPlanner
#435 Remove reduce test accoarding to code review

Per code review, removing reduce test as the callReduce method will return nil when there is no reduce. The code is also cleaner without the test.
Made continuous change tracker able to handle self-signed server certs

Made WebSocket class able to use custom SSL settings and added a delegate
method to report the SecTrustRef. CBLWebSocketChangeTracker then checks
the trust the same way as CBLSocketChangeTracker.
For #444
Fix #447 NAN in a document property

* Modify CBLCanonicalJSON to check NaN value and return an error when there is a NaN property in the document

* Update CBL_Pusher, CBL_Replicator, CBLDatabase, CBLView+Insertion, and CBLView+LocalDocs according to the fix

* Add unit tests to validate the fix
#447 Simplify encoding methods per code review

Simplify encoding methods by not passing an error around and just setting the _error ivar.
Fix #432 Add index on maps and attachments table

* Add sequence index on maps and attachments for revs(sequence) on DELETE CASCADE

* The fix was taken from
https://github.com/hermanccw/couchbase-lite-ios/commit/efa70ee9e18986dd62488fa1d7d4ac7b91c185f0
#439 Add NSURL support to the CBLModel property

Implement NSURL support to the CBLModel property and update unit tests accordingly.
Merge pull request #453 from couchbase/feature/issue_432

Fix #432 Add index on maps and attachments table
Merge pull request #454 from couchbase/feature/issue_439

#439 Add NSURL support to the CBLModel property
Merge pull request #450 from couchbase/feature/issue_447

Fix #447 NAN in a document property
CBLReplication implementation cleanup

Removed old RUN_IN_BACKGROUND flag. Simplified calling background methods.
Fixed the (disabled) logging of SQLite features at launch

This code is useful for checking what SQLite features are enabled in the OS.
I also added a line that logs the current SQLite version number.
#316 Add 'type' document property to the CBLModel

* Add 'type' document property to the CBLModel.

* Add API_ModelTypeProperty test to ModelTests.
Merge pull request #445 from couchbase/feature/issue_435

Fix #435 Missing the last group when there is no reduce
Finally converted CBLQueryOptions from a struct to an Obj-C class.

Cherry-picked from forestdb branch.

Conflicts:
	Source/API/CBLQuery.m
	Source/CBLDatabase+Internal.h
	Source/CBLDatabase+Internal.m
	Source/CBLView+Internal.h
	Source/CBLView+Querying.m
	Source/CBL_Database_Tests.m
	Source/CBL_Router+Handlers.m
	Source/CBL_View_Tests.m
	vendor/CBForest