Some refactoring plus overriding the implementation of the default
DatastoreImpl.ensureIndexes() method to remove a buggy call to
DBCollection.getDB().getLastError() [getLastError() doesn't work
correctly across threads sharing a DB instance, plus the
java-mongo-driver version is new enough to handle it].