Fix race condition in XmppServerConnection cleanup.

Change-Id: I55a765a217ecaabfa0b00e8091ce9f1aeeb1b798