Squashed commit for these two issues

https://github.com/couchbase/couchbase-lite-android/issues/397
https://github.com/couchbase/couchbase-lite-android/issues/398
Detect 409 Error on PUT checkpoint issue with unit test

https://github.com/couchbase/couchbase-lite-java-core/issues/250
Reproduce batcher thread safety issue

https://github.com/couchbase/couchbase-lite-java-core/issues/283
Reproduce batcher thread safety issue - minor tweaks

https://github.com/couchbase/couchbase-lite-java-core/issues/283
Re-Merge pull request #415 from yaronyg/patch-13

Hand merge this since it didn't merge cleanly when merging in the feature/issue_249_restart_replications feature branch.

Fix https://github.com/couchbase/couchbase-lite-java-core/issues/279
Change exception signatures

the runReplication now throws Exception rather than CouchbaseLiteException