Close xmpp stream properly