Add tests for XmppServer shutdown

Change-Id: Iae2f2ee3ec053852288a0d2391d4eb4eb5780bbd