Fix race condition in XmppServerConnection cleanup.

Change-Id: I3735e78c0909a4f125ab71c35c45506d92040f9d