Optimizations to CBLCanonicalJSON

* Sped up encoding numbers quite a bit (this was actually a noticeable
  performance issue during bulk inserts of documents.)
* Reordered the class testing in -encodeObject: to check for NSNull last
  because it's rarely used.
Fixed a logic error in yesterday's commit 1d73dec
(fixes for canonical JSON)
Doc-insertion optimizations, including async db writes.
CBForest optimizations, focusing on iOS devices
Updated to latest ForestDB (config changes, auto-compact)
WIP: Converting to C++ CBForest API
WIP: Converting to C++ CBForest API (cont'd)