Fix race condition in XmppServerConnection cleanup.

Change-Id: I472d69c4f89a5dd0617f10d2b6a11774bc74bfe4