Persist automate state data between retries

https://bugzilla.redhat.com/show_bug.cgi?id=1044175

During the execution of an automate method the following 3 methods
can be called to set/get/check for existence of state data.

$evm.set_state_var     This takes a name and value as the 2 arguments
$evm.get_state_var     This takes a name and returns the corresponding value object
$evm.state_var_exist?  This takes a name and checks if the variable exists

The name in all 3 functions above can be a string or a symbol.
If the name is missing nil is returned.
@mkanoor I agree with @kbrock on the readability of his snippet being better.

@kbrock I'm not sure I understand your question.  Part of the reason it is being converted from YAML to a Hash is because it needs to be serialized so it can be saved between runs.  However the callers are expecting a Hash.