Fix race condition in XmppServerConnection cleanup.

Change-Id: I6e39dacc6f73f382fd5ba8c95c03f18b2ab6840b