Added basic state machine capability on models.  This is enabled by including a state_machines object on the model object.
Each field in state_machines will be treated as a separate state machine and will add an appropriate field to the states object on the model which is created automatically if state_machines are present.
When an model has a state_machine, all actions performed are validated against the current states of the model, if the none of the state_machines on the model grant access to the action, the action will fail.

Error handling is very vague. TO-DO build method which will list valid actions based on the models state.