Fix race condition in XmppServerConnection cleanup.

Change-Id: Ia834f06f042b2ab0851268b42ec4bc2fc3bae271