Fix race condition in XmppServerConnection cleanup.

Change-Id: I1ec5f3740d8580f969da0880e1ab2b66d15d8c36