Issue #129 - convert to use AtomicInteger

https://github.com/couchbase/couchbase-lite-java-core/issues/129