Add tests for XmppServer shutdown

Change-Id: Iebaeba0288f2f3a3b340b3524291cc94fa3a6baf