Add dialog and better state management

StateMachine and Dialog classes added, Dubstep game uses them.