Make reproduce_ci_env.py more tolerant of scripts

When `reproduce_ci_env.py` makes its docker container, it creates a pair
of scripts, `setup-gitlab-env.sh` and `run-gitlab-stage.sh`, inside the
container. These scripts came from the `before_script` and `script` CI
configuration parameters, respectively.

These two scripts were created by joining each item in the CI
configuration lists with `&&` onto a single line. However, this meant
that each list item had to be on its own line or it didn't work. A
recent configuration change meant that one of the configurations
contained multiple shell commands separated by newlines. This change
builds the script with multiple lines (which have to be carefully
escaped in the generated dockerfile).

Also modified these strings to escape quotes (`"`). This is important as
the dockerfile generates these scripts using an `echo` command that
needs to quote all of the arguments together.
5 jobs for reproduce-ci-fixes
Status Name Job ID Coverage
  External
passed cdash-buildbot

running vtk-m-dragnipur-osx-shared-debug+32bit_ids+64bit_coords+clang+tbb

1460:59:01

running vtk-m-dragnipur-osx-static-release+64bit_coords+clang+tbb

1460:59:01

running vtk-m-osheim-windows-shared-debug+ninja-vs-2017+tbb

1460:59:01

running vtk-m-osheim-windows-static-release+ninja-vs-2017+tbb

1460:59:01