Fix race condition
Fix for compile warning as 1.6 doesnt have @SafeVarargs
JAVA-1355: Don't initialize cluster type if the server is a replica set ghost
JAVA-1356: MongoCollectionOptions.Builder must override inherited methods to return the correct type.
update build.gradle to support gradle 2.3