refactored stop_xmpp_for_app to be more clear about what its stopping