XMPP and WebSocket transports require different open and close stanzas. To
handle this the responsibility handling those and creating the XML decoder is
moved to the Transport.
This makes it possible to use a factory function to create a transport of the right type and not having to repeat the address when calling Transport.Connect()