Replace shell generators with commands in the gitlab-runner[-helper]
Currently, running a build is a matter of generating a shell script and injecting it into a build context, where it is run by a chosen shell. There are a number of problems with this approach, primarily around detecting the shell to use, correctly generating the shell script itself, testing them, etc, and fundamentally, it mixes code with data in a hard-to-work-with manner.
I propose that we remove the shells entirely, and make it a requirement that either the gitlab-runner or gitlab-runner-helper binaries are in the build context. The build steps that are currently generated shell scripts can be turned into internal commands, in the same way that download cache or upload artifacts works today. Data can be injected into the build context in the same way the mixed data+code is injected now.
Restoring the strict separation between code and data will improve input validation, and gitlab-runner has a good cross-platform runtime embedded in it which can be used instead of the existing ShellWriter implementations, so extending the functionality of these scripts becomes easier.
Testing the scripts also becomes much easier, as the commands can be invoked directly with permutations of data, rather than a mixed data+code script file needing to be generated for each test. Coverage for this part of the runner's functionality is poor, so this would be welcomed.
/cc @tmaczukin @ayufan