Fix race condition in XmppServerConnection cleanup.

Change-Id: Ib47311fb3fde0c6fab9713f3677975caa0cb7d71