Make sure that *Connection#close isn’t run concurrently

This closes #8. Thanks to @mimperatore for finding the issue and providing a patch.