Fix xmpp connection cleanup.

Change-Id: I047c1bae55a98bc4ef7bbe417d63994eb29d0cfc