Fix race condition in XmppServerConnection cleanup.

Change-Id: Iaa27d9514a8c9d8a9846b9df87d8485ea5cc652d