Also change StringUtils.escapeForXML() and Packet.toXML() to return
CharSequence instead of String. XmlStringBuilder now has 'optX' methods.
Remove XmlUtils in favor of XmlStringBuilder
There is a unsolveable race condition between the connection state and
sendPacket(), i.e. the connection could go down, right after the
method calling sendPacket is called, but before sendPacket() is
invoked. Before this change, sendPacket() has thrown an unchecked
IllegalStateException, which could be ignored by the Smack user, who
would also not notice the race condition. We have decided to throw a
checked Exception in this case now, to make the Smack user aware of
this situation.
SMACK-426
Also remove the Exceptions from the signature of getRoster().
Extend ConnectionListener with connected() and authenticated()
callbacks, required by Roster to be notified so that the Roster can be
loaded *after* login.