[WIP] State machine

This change tackles #95 with `@transition` decorator. The old way was way to cumbersome and error-prone. ~~However, some things are not yet working/tested~~:

- [x] Multiple target states and how to choose one inside a device.
- [x] How to handle error states. To me the best solution would be that the device author raises an exception which is caught by the state machine and turned into a proper error state.

Before the flame war starts: yes I am fully aware that the statess themselves are encoded as strings.