motor: Helper to deal with the states as a set of flags
Rework the state to deal with is as a set of flags.
This allow to have a more reliable code. Previously only the first state was used.
Update all the motor variants with this helper.
For the future, a better way would be to update redux with such structure directly (and including custom states).