Fixes #130.

Normally revpos will be a long, but in some cases,
it will be an int. This fix handles both cases.
Merge pull request #132 from couchbaselabs/fixes-130

Fixes #130.
Complete issue #116

Port
https://github.com/couchbase/couchbase-lite-java-core/commit/4b063f13a78
c461ac5e8dfa57f6bed4563eebabd
Merge pull request #133 from couchbaselabs/issue-116

Complete issue #116
Fixed merge issue.