Complete issue #161

- Port fix for issue couchbase/couchbase-lite-java-core#100.
- Taking # of missing revisions into account when updating ChangesCount.
Merge pull request #236 from couchbaselabs/issue-161

Complete issue #161