Add tests for XmppServer shutdown

Change-Id: I05e5fd8a3cb35029508b89417a7e49d52909324f