Fixed a db-upgrader bug

Some revs have no JSON data; that means an empty doc.
So translate that into "{}".
Also added extra autorelease pools.
Optimizations for saving revisions

* Replaced canonical JSON encoder with a faster one.
* Don't need to create CBL_MutableRevision object up-front.
* Optimized creation of CBLDocumentChange.
Removed asynchronous generation of JSON during document save

The GCD overhead significantly slows down saving, on an iOS device. :(
Custom sorting of CBLQueryEnumerators

Added CBLQuery.sortDescriptors,
and -[CBLQueryEnumerator sortUsingDescriptors:].
Updated to latest forestdb
Fixed a bug in view querying found by the static analyzer