code cleanup: use mixlib-shellout and run_state

Use mixlib-shellout for shell calls, not backticks.
Use run_state to store transient information; don't hack the resource collection.