Manual merge for https://github.com/couchbase/couchbase-lite-java-core/commit/ed064b486adc7bd0c68e61392a2f8ae4ff1362c3
Manual merge for https://github.com/couchbase/couchbase-lite-java-core/commit/0b115942e76d6a3806011d942e837a17e535b05b