Fixes #260 by porting collator changes over from iOS

Also, the collation tests were not passing in the string length parameters, so tests were enhanced accordingly.

https://github.com/couchbase/couchbase-lite-android/issues/260