Implemented Transport.close() for all transports.
Added some unit tests