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
#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.
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
Back-ported CBJSONEncoder from the forestdb branch

This replaces CBLCanonicalJSON. It's a faster encoder that uses the C
yajl library.
Unit tests for CBJSONEncoder

Also added some improvements to handling of booleans vs. small integers.
API: Added -[CBLReplication isDocumentPending:]
Merge branch 'master' into feature/unpushed
#316 Move the property to the protected section

Move the property to the protected section and improve comment per code review.
Merge pull request #455 from couchbase/feature/issue_316

#316 Add 'type' document property to the CBLModel
Improved SQLite busy handling by using an in-memory lock
NSDecimalAttributeType change type NSNumber to NSDecimalNumber
Merge pull request #462 from ManuTroquet/NSAttributeType

[coredata] NSDecimalAttributeType change type NSNumber to NSDecimalNumber
view reset should not count initial deletes as changes, otherwise total docs might end up as negative if new view mapblock emits less rows than the previous
update CBLView setMapBlock: to post kCBLDatabaseChangeNotification. this causes any live queries to be updated
Merge pull request #470 from mglasgow/bug-newMapBlockHasLessRows

view reset should not count initial deletes as changes, otherwise total ...