Reverts HA state transitions if one or more state transition listeners fail

This will make the state machine more resilient and a retried event will be able to succeed.