Task blocking refactoring

Drop automaton state processing to recover task blocking. Instead, rely on the
sched_switch event field prev_state, that indicates at the schedule out time
whether or not the task enters blocking state.