Create replacement dict creation in worfklow controllers once.

Both recalculated this per step, brings the actual run code closer together - which will make subsequent changeset diff cleaner.
Refactor out common code for running workflows.

This probably results in some bug fixes for the API workflow running - such as running tools with multiple=true data input parameters.
Refactor 2 paths of workflow step invokation into helper functions.