Fix race condition in XmppServerConnection cleanup.

Change-Id: Ie8aaf109a5d7f8fc8066c751a549448532c68ef0