Cast state to string in StateMachine#getState

Hi,

This adds support for Doctrine Enums, and possibly other use cases where your status is an object.

| Q | A |
| -------------  |------|
| Test Pass? | y     |
| License      | MIT |