* Move state length validation to StateMachine async_set method
We call validate_state to make sure we do not allow any states
into the state machine that have a length>255 so we do not break
the recorder. Since async_set_internal already requires callers
to pre-validate the state, we can move the check to async_set
instead of at State object creation time to avoid needing to
check it twice in the hot path (entity write state)
* move check in async_set_internal so it only happens on state change
* no need to check if same_state