Fixes #164 by porting from iOS

https://github.com/couchbase/couchbase-lite-java-core/issues/164
Merge pull request #175 from couchbase/feature/issue_164_revid_md5

Fixes #164 by porting from iOS