auto-unspool pending actions on state leave because this is even more convenient than just having to provide a leave method with a single unspool() call all the time. Partially contributed by Christian Vaas.