Handle open connections when creating the test database

In cases where a previous test db exists (due to test failures) it's needed to close connections in order to not block DROP DATABASE calls. (For some reason the _create_test_db method does not use _destroy_test_db but call DROP DATABASE directly)