modify controller task to render in one step

Instead of baking actions seperately, and passing actions as a string to
the controller template - pass the array of action names directly to the
controller template
phpcs fixes for baked controller actions
Merge pull request #5259 from AD7six/3.0-bake-test-fixes

refactor ControllerTask::bakeActions