Fix race condition in XmppServerConnection cleanup.

Change-Id: If0f8c49d97979ba035cbc28b4423fcca98ba2e17