Fix race condition in XmppServerConnection cleanup.

Change-Id: If8ab6a251e77cfc060124598c7f854a2bfa2a114