Fix race condition in XmppServerConnection cleanup.

Change-Id: Iead0d188e425de01a51ac575ddc844460d35227b