Fix race condition in xmpp session cleanup.

Change-Id: I336d4e718ea9c72345c0c7c8dd4f90af8f8fbd45