Fix race condition in XmppServerConnection cleanup.

Change-Id: I5948727092a3230620fe4d45f8b6d8dfb4ab35b9