Fix race condition in XmppServerConnection cleanup.

Change-Id: I323fa4641aee30e46e38dc45629b39b2220ea6d1