Added StateMachine and State classes. SpeedRadar uses a state machine to change its behaviour.