Fix for CONNECTORS-333. Use the CloseHook API to free connections. We still get a warning message, but that's going to happen since the connection manager creates a static thread.