Fix race condition in XmppServerConnection cleanup.

Change-Id: I064d1f50260a35c42feee93c08df86ecf48756bb