Wrap in a try/catch: adding cookies.  (if this fails, should log an error but not break the whole request).

Issue discovered when using Mock Http Client
move createDocumentWithProperties() into LiteTestCase
Add a response delay and refactor a few things into methods to be clearer.
Add testPushPurgedDoc() which detects issue #167.

https://github.com/couchbase/couchbase-lite-android/issues/167
Update comment to point to couchdb docs
Add testLoadRevisionBody() which detects the root cause of issue #167

https://github.com/couchbase/couchbase-lite-android/issues/167
loadRevisionBody now throws exception with appropriate status when it can't load the revision body.  (Issue #167)

https://github.com/couchbase/couchbase-lite-android/issues/167
If not possible to load revision body, don't add this revision to outgoing _bulk_docs.  Don't send anything if there are no outgoing _bulk_docs.  Fixes #167.

https://github.com/couchbase/couchbase-lite-android/issues/167
Functional (cblite-tests) tests were still not passing due to a race condition.  Details below.  (issue #167)

1) replicator thread: call db.loadRevisionBody for doc1
2) liteserv thread: call db.purge on doc1
3) replicator thread: call db.getRevisionHistory for doc1, which returns empty history since it was purged

Fix/workaround by making the purge operation happen in serial with the replicator work queue.

https://github.com/couchbase/couchbase-lite-android/issues/167