Fix race condition in XmppServerConnection cleanup.

Change-Id: Ie9b7ddbd665feaa804ac9e6e6ba22d22f3df6fbb