Port RevCollator from couchbase-lite-ios

Port RevCollator from couchbase-lite-ios. Move all jni source codes from couchbase-lite-java-core.