Fix race condition in XmppServerConnection cleanup.

Change-Id: I666fbdef3d52ccd9a18a5f4386de6a35aeae2a1e