Remove race condition in test_bad_client_socket

The KATCPserver._stream_closed_callback is called async with no specific
synchronisation, which is fine, since it only needs to remove the connection
form the KATCPserver._connections dictionary to prevent a memory leak. Since
this test specifically tests that it is removed, we need to wait for the call to
happen. It will definitely get called if we let the ioloop run once, so adding
self.server.sync_with_ioloop() in the test fixes the race.