CBLManager needs to forget replications involving deleted database

When a database is deleted, CBLManager now removes all replications
involving it from its _replications array. Otherwise those replications
could be re-used if a new database with the same name is created; this
results in conflicts if the replications are persistent, since their
documents have already been deleted.
Fixes #180
Updated API of CBLRevision

…plus some side effects on CBLAttachment and CBLModel.
Updated the rest of the CBLAttachment API.
Updated API of CBLManager
Updated CBLDatabase API
More CBLRevision API updates

* Moved -revisionHistory: up to CBLRevision
* Made CBLNewRevision.userProperties settable.
Updated CBLDocument API

No changes from the API spec. But I did make some changes:
* Renamed -tdDocumentChanged: to -CBLDocument:didChange:.
* .modelObject now must conform to the CBLDocumentModel protocol
* kCBLDocumentChangeNotification now includes a CBLDatabaseChange object
* Cleaned up some formatting and edited some doc-comments
Updated CBLQuery (etc.) API
Updated CBLReplication API
Oops, shouldn't've committed WebSockets-Cocoa
Rename -deleteAttachmentNamed: back to -removeAttachmentNamed:

“remove” is more idiomatically Cocoa than “delete”.
Renamed CBLQuery.staleness to .updateMode
Added CBLModel support for nested custom objects as properties

A dynamic property can be of any class that conforms to the new CBLJSONEncoding protocol
(or an array of such a class.)
Fixes #197
Renamed CBLNewRevision to CBLUnsavedRevision (per API spec)

Fixes couchbaselabs/couchbase-lite-api#33
Removed CBLSavedRevision.propertiesAreLoaded from public API

Fixes couchbaselabs/couchbase-lite-api#32
Makes CBLDatabaseChanges.h public do that change notifications can be processed by apps, etc.
Merge pull request #200 from chbeer/master

Makes CBLDatabaseChanges.h public so that change notifications can be...
Merge remote-tracking branch 'upstream/master'

Conflicts:
	Source/API/CBLDatabase.m