sched: Add function to change scheduler state and always use it
I'm thinking about hypothetical future debugging efforts here.
I think it would be nice to have
```
channel_set_scheduler_state(chan, new_state) {
log_changed_from_state_to_state()
chan->scheduler_state = new_state
}
```
And then change every instance of `chan->scheduler_state = [...]` to `channel_set_scheduler_state([...])`. Future hypothetical debugging sessions can be guaranteed to have information regarding what state each channel at all times.
Extra points if it logs some of the stuff in `scheduler_bug_occurred` too.
issue