Fix race condition in XmppServerConnection cleanup.

Change-Id: I8f5281ade0be9718246b089a4de275424651b3b3