Listener for circuit breaker state changes.
Called whenever the circuit breaker transitions between states.