Fix race condition in XmppServerConnection cleanup.

Change-Id: Icc4a1a7e7b7ee8cfb2401bb6617c2d9590c600b4