Reduce duplication related to populating wf step state between Web & API.

Basically move all operations prior to workflow invocation relating to populate the non-persistent attributes of `WorkflowStep`s into a single function on a new class.