Replace the 'action' options by 'step'

Replace the recently added 'action' option by the 'step' option.

This option is stored in $config->{step} rather than in the options
hash. This is because next commit will make it possible to set
configuration options based on the current step.
Fix target redirect when target definition is an array
Add some tests
Add support for config based on current step