Fix race condition in XmppServerConnection cleanup.

Change-Id: I3622de720055f5a81f217f194bcc5e86775e73b4