Fix race condition in XmppServerConnection cleanup.

Change-Id: I8294dec1bb11bd721c7d25cbdcccff3a585bf144