Replaced the default workflow gem by state_machine

The state_machine gem has a better reputation, and it seems to be a bit
easier to manage.