v2.0.0 a state machine frame work

- Refactored the creation of state machines. The generated code will now
  generate an object containing the state machine, and instances of this
  state machine will be created using the `new` keyword.
- It is now possible to see the generated code by using the `.toString`
  function.
- The before transition events has been removed.