JAVA-1187: Be less aggressive closing connections on exceptions

We should catch the `MongoException` first. Otherwish, any `RuntimeException` (com.mongodb.MongoException$DuplicateKey for example) will cause connection closed.