Fix race condition in XmppServerConnection cleanup.

Change-Id: I8371bcba1de67784f45802ad2df95eb98bfe4b0f