Fixes #283 by using a blocking queue

Replace the LinkedHashSet with a blocking queue.

Tests pass on genymotion emulator and nexus 5.

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