Xcode 6 compatibility

The module-import feature didn't like the extension interface of
CBLDatabaseChange being in CBLInternal.h, so I moved it to
CouchbaseLitePrivate.h. Still not entirely sure what was going on, but
this way it compiles...
Renamed test apps & their targets

"Grocery Sync iOS Demo" --> "CBL iOS Test"
"CBL Mac Demo" --> "CBL Mac Test"
Allow customization of iOS file protection settings

Added CBLManagerOptions.fileProtection.
Made CBLBlobStore default to using CompleteUntilFirstUserAuthentication.
Fixes #374 (I think)
Fixed: Puller checkpoint not updated on 404 error getting a document

CBLPuller needs to recognize permanent failures downloading revisions.
Fixes #377
Quick documentation link update

Moving from docs.couchbase to developer.couchbase.
Fix incorrect JSON parse errors handling _changes entries with empty 'revs' arrays

Triggered by a recent Gateway commit (1da4ee4) -- it now sends _changes entries when
the user's settings change, and those entries have an empty 'revs' array.
Fixes #384 (I think)
Fixed Listener handling of conditional GETs with Range headers

If a request had both a Range header and an If-None-Match, and
the Etag matched, the response status was incorrectly set to 206
instead of 304. (This was a bug in the CocoaHTTPServer submodule.)

I also fixed a bug with Range requests of gzip-encoded attachments:
the attachment has to be decoded otherwise the byte range applies to
the gzipped data, not the actual attachment content.
Fixes #317
Fix KVO exceptions after saving a CBLModel

When KVO-observing an object that is itself a property of a model, and then saving the model, the _properties dictionary was cleared —
 this caused the object being observed to be dealloced, triggering an exception.
Fixes #244
Simplified some logic in CBLPuller

Traun pointed out that _caughtUp will always be NO at this point,
since -startChangeTracker is only called from -beginReplicating
after clearing _caughtUp.
Improved handling of CBL_Puller changesTotal count

This should fix the changesTotal temporarily going negative.
Also, if some incoming revisions already exist, it now responds by
increasing changesProcessed instead of lowering changesTotal, which
makes more sense.
Fixes #351

Conflicts:
	Source/CBL_Puller.m
Oops, forgot to push CocoaHTTPServer.
WebSocketChangeTracker: Reset retry interval after successful connection

Fixes #335
Re-index multiple views together

When updating a view's index, also update other views' indexes. This
saves time because a lot of the work (iterating through the sequences,
fetching the documents, looking for conflicts) is shared.

Like CouchDB, I'm grouping views together for this purpose. The other
views that will get updated are the ones sharing the same prefix up
through the first "/". Or if the view name has no "/", it's all the
other views without a "/".
Optimization for naughty map functions that emit 'doc' as value

Instead of storing the whole doc dictionary, store a placeholder ("*").
At query time, detect the placeholder and load the revision body.
A few more view-indexing optimizations
Changed indexing behavior so views with no “/“ in name don’t index together.

There’s a compile-time flag GROUP_VIEWS_BY_DEFAULT that can be defined
to change this back to having all those views form one group.
fix conform path for #import
Fixed equality test for query rows whose value is 'doc'

Regression from the emit-doc optimization (03454e8)
Merge pull request #389 from ManuTroquet/master

fix conform path for #import
Added a unit test for emitting nil values. Fixed some Xcode 6 compile issues.