Some general utility methods used in networking contexts, as well as helper methods for the roster and XMPP accounts.