Fix handling of on_exit() in event-based actors

This fixes an issue in the scheduler that prevents event-based actors from
setting a new behavior in on_exit().