Fixed a race condition with doc update notifications

If changes happened quickly enough, it was possible for the onCompletion block of a document save operation
to be called _after_ the document got an external-change notification of a _later_ revision. (This occurred with
CouchPersistentReplication on its initial save -- the replicator manager immediately updates the document with
a task ID and "triggered" state, and this change was arriving before the model was told it had finished saving,
so it wasn't ready to respond to external changes yet.
Fixes https://github.com/couchbaselabs/TouchDB-iOS/issues/187 , I think.