[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:

- [ ] Multiple target states and how to choose one inside a device.
- [ ] How to switch to a different target state. To avoid being to detailed, the device author should just raise 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.