Fix race condition in XmppServerConnection cleanup.

Change-Id: I55cf7e0ef0c8a602d557000356022b14d08d2ecb