Fix race condition in XmppServerConnection cleanup.

Change-Id: I3d9577e4caa821026696bb2f267c25dfb31d0c9e