Fix race condition in XmppServerConnection cleanup.

Change-Id: I6163902a928849f2e91a1d428b989bae03082a1b