Fix xmpp connection cleanup.

Change-Id: Iff3041f74ac3fc9adf2ceadcd7ff0cc7d0755d89