Closing a connection that has usageCount > 1 "should never happen". However, it can happen if JdbcPooledConnection.getConnectionHandle() throws an exception - e.g. if testConnection() fails. So ensure that JdbcPooledConnection.getConnectionHandle() decrements usageCount again if it fails, and sets the connection's  state to NOT_ACCESSIBLE.

This fix is currently only for "correctness" w.r.t. JdbcPooledConnection's documented semantics. The only visible effect is seeing fewer warnings in the log.