* bzrlib/transport/ftp/__init__.py: (FtpTransport.disconnect): Close the ftplib connection.
* bzrlib/transport/__init__.py: (Transport.disconnect): A do-nothing implementation by default. (ConnectedTransport.disconnect): A new required method.
* bzrlib/tests/test_smart_transport.py: (TestSmartTCPServer.test_get_error_unexpected) (SmartTCPTests.start_server): Revert to SmartServer waiting for a better way to capture the connections.
* bzrlib/tests/per_transport.py: (TransportTests.test_connection_sharing): 'None' is better than 'object()' for a dummy connection.
* bzrlib/tests/__init__.py: (TestCase._check_leaked_threads): Don't fail at first leak or all subsequent tests will fail too. A more elaborate scheme would be to use threading.enumerate() but that's a big hammer with little benefits as long as there exist "valid" leaks (like the smart server). (TestCaseWithMemoryTransport.setUp): Make sure we call transport.disconnect() for all created transports.