Add tests for XmppServer shutdown

Change-Id: Ic4c265ad61ac79b41ba85a2925d84816433c5a2b