Fix race condition in XmppServerConnection cleanup.

Change-Id: Ic706b901b0f63b72a5d5bae6cadd87a7ada687b8