Replace the external state_machine with an internal implementation

https://bugzilla.redhat.com/show_bug.cgi?id=1089061

This work refactored Job and its subclasses to use an internal implementation of state machine, removed the dependency of the state_machine gem.
Perhaps it makes sense to move this logic into a state= method to avoid putting this conditional logic here.  Just an idea... 

```ruby
def state=(next_state)
  super unless next_state.nil? || next_state == '_'
end
```