Fix race condition in XmppServerConnection cleanup.

Change-Id: I061f7c58d375c72849ead76909a0cba821326fbf