Added DB integrations

This pull integrates the State Machine with a database engine.

TODO
- [ ] Create a migration schema

Models that want to use the StateMachine must alter their tables with `state` and `previous_state`. A Migration task will do this for you.