Fixing concurrency issue in ServerSyncEngine.

Motivation:
The problem in this case the engine was checking if an document exists
in the underlying database but since the server is multithreaded a
docuement might have been added to the datastore while the first one was
in progress. This could be trouble if the document content was null.

Modifications:
The engines addDocument method has been updated to check if a document's
content is null and if no document exists the client will get back a
"patch message" containing an empty diff.

Result:
A client can add a document with a null content which will allow the
client to receive updates when a document is later added.