Fix race condition in XmppServerConnection cleanup.

Change-Id: I1457db62c8ac4bc142759b13840cc1c5d2674789