Add switch_set_active() function

This adds a small, but convenient helper function for quickly enabling/disabling switches.