Add tests for XmppServer shutdown

Change-Id: Ib1a65d082746a61902d364b98ecc61fd607cd049