Since a transport (and a streamlogger) does not implement io.ByteReader
xml.Decoder wraps it using `bufio.NewReader(transport)` so it can easily read
bytes one at a time. This has the unfortuante effect of resulting in a panic if
we try to parse a stanza that is larger than the default buffer size of 4096
bytes.
To fix this we wrap the transport using `bufio.NewReaderSize()` with a much
larger buffer size.
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()