Stabilizing Switching for Autonomous Systems