Fix race condition in XmppServerConnection cleanup.

Change-Id: I557efc4f972e9e1dbdc25a6bcb38f6fa6e9e7474