Set process group for commander commands

Have the commander create a process group for every command it starts.
This is so that each subprocess has the PPID set to the process that the
custom executor start which will help with process termination. More
information about process groups can be found in
http://www.informit.com/articles/article.aspx?p=397655&seqNum=6.

Update the unix killer to be aware of process groups and send the
singal to each process instead of just the main process to prevent any
orphan processes.

This [program](https://gitlab.com/snippets/1930074) will spawn 10 child
processes and all of them are attached to the Runner process since there
is not process group set:

```plaintext
$ ps -opid,pgid,command

16934 16934 go run main.go run -c /Users/steve/Code/gitlab.com/gitlab-org/gitlab/gitlab-runner-config.toml                                                                                          <--- Runner process
16962 16934 /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/go-build263333944/b001/exe/main run -c /Users/steve/Code/gitlab.com/gitlab-org/gitlab/gitlab-runner-config.toml
17164 16934 bash /Users/steve/Code/gitlab.com/custom-executor-drivers/debug/run.sh /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/custom-executor808275188/script062524327/script. build_script   <--- run.sh still belongs to runner process group
17165 16934 /bin/bash /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/custom-executor808275188/script062524327/script.
17167 16934 /bin/bash /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/custom-executor808275188/script062524327/script.
17168 16934 /Users/steve/Code/gitlab.com/steveazz/siglistener/siglistener
17169 16934 sleep 60
17170 16934 sleep 60
17171 16934 sleep 60
17172 16934 sleep 60
17173 16934 sleep 60
17174 16934 sleep 60
17175 16934 sleep 60
17176 16934 sleep 60
17177 16934 sleep 60
17178 16934 sleep 60
```

With this commit we start getting what we see below. Notice how the pgid
of the child process `sleep` are now for the `prepare_script` instead of
the Runner process.

```plaintext
$ ps -opid,pgid,command

66515 66515 go run main.go run -c /Users/steve/Code/gitlab.com/gitlab-org/gitlab/gitlab-runner-config.toml                                                                                          <--- Runner process
66991 66515 /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/go-build545902909/b001/exe/main run -c /Users/steve/Code/gitlab.com/gitlab-org/gitlab/gitlab-runner-config.toml
67086 67086 bash /Users/steve/Code/gitlab.com/custom-executor-drivers/debug/run.sh /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/custom-executor612101401/script079237912/script. build_script   <--- run.sh set as progress group
67087 67086 /bin/bash /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/custom-executor612101401/script079237912/script.
67089 67086 /bin/bash /var/folders/h4/45_ps9bn4jb6w51g1ngy_n5c0000gn/T/custom-executor612101401/script079237912/script.
67090 67086 /Users/steve/Code/gitlab.com/steveazz/siglistener/siglistener
67091 67086 (sleep)
67092 67086 (sleep)
67093 67086 (sleep)
67094 67086 (sleep)
67095 67086 (sleep)
67096 67086 (sleep)
67097 67086 (sleep)
67098 67086 (sleep)
67099 67086 (sleep)
67100 67086 (sleep)
```

More information about this testing can be found in
!1743/#how-to-test

This follows the model of the Shell executor and is explained in detail
in
https://medium.com/@felixge/killing-a-child-process-and-all-of-its-children-in-go-54079af94773
why it's needed.

reference #3376
reference #4438
50 jobs for !1743 with add-process-group-to-process-pkg in 121 minutes and 30 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Prebuild
passed #455614516
clone test repo

00:01:18

failed #455614515
docker
helper images

02:00:00

passed #455614517
gitlab-org
tests definitions

00:04:09

 
  Test
skipped #455614521
check feature flags docs
skipped #455614523
check mocks
skipped #455614522
check modules
skipped #455614524
code_quality
skipped #455614519
docs lint
skipped #455614555
git 1.7.1
skipped #455614518
allowed to fail
license_management
skipped #455614526
docker
unit test 1/8
skipped #455614529
docker
unit test 2/8
skipped #455614532
docker
unit test 3/8
skipped #455614534
docker
unit test 4/8
skipped #455614535
docker
unit test 5/8
skipped #455614536
docker
unit test 6/8
skipped #455614537
docker
unit test 7/8
skipped #455614538
docker
unit test 8/8
skipped #455614539
docker allowed to fail
unit test with race 1/8
skipped #455614540
docker allowed to fail
unit test with race 2/8
skipped #455614541
docker allowed to fail
unit test with race 3/8
skipped #455614542
docker allowed to fail
unit test with race 4/8
skipped #455614543
docker allowed to fail
unit test with race 5/8
skipped #455614544
docker allowed to fail
unit test with race 6/8
skipped #455614545
docker allowed to fail
unit test with race 7/8
skipped #455614546
docker allowed to fail
unit test with race 8/8
skipped #455614548
shell windows-1803 allowed to fail
windows 1803 tests 1/3
skipped #455614550
shell windows-1803 allowed to fail
windows 1803 tests 2/3
skipped #455614551
shell windows-1803 allowed to fail
windows 1803 tests 3/3
skipped #455614552
shell windows-1809 allowed to fail
windows 1809 tests 1/3
skipped #455614553
shell windows-1809 allowed to fail
windows 1809 tests 2/3
skipped #455614554
shell windows-1809 allowed to fail
windows 1809 tests 3/3
 
  Coverage
passed #455614559
check windows 1803 test failures

00:01:09

passed #455614560
check windows 1809 test failures

00:00:54

passed #455614558
race conditions detector

00:01:29

failed #455614556
test coverage report

00:01:27

failed #455614557
test junit report

00:01:27

 
  Build
skipped #455614561
gitlab-org
binaries darwin/386 darwin/amd64
skipped #455614562
gitlab-org
binaries freebsd/386 freebsd/amd64 freebsd/arm
skipped #455614563
gitlab-org
binaries linux/386 linux/amd64 linux/arm linux/arm64
skipped #455614565
gitlab-org
binaries windows/386 windows/amd64
 
  Package
skipped #455614567
gitlab-org
package-deb
skipped #455614569
gitlab-org
package-rpm
 
  Release
skipped #455614570
release
development S3
skipped #455614572
release
development docker images
skipped #455614575
shell windows-1803
development servercore1803 helper docker image
skipped #455614577
shell windows-1809
development servercore1809 helper docker image
skipped #455614579
static QA
 
  Docs
skipped #455614581
allowed to fail manual
review-docs-cleanup
skipped #455614580
allowed to fail manual
review-docs-deploy
 
Name Stage Failure
failed
test coverage report Coverage
go: finding github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: finding github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5
go: finding github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96
go: finding golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
go: finding github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82
go: finding k8s.io/utils v0.0.0-20190923111123-69764acb6e8e
grep: .cover/*.count.cover.txt: No such file or directory
make: *** [Makefile:119: parallel_test_coverage_report] Error 2
ERROR: Job failed: exit code 1
failed
test junit report Coverage
go: finding github.com/docker/go-metrics v0.0.0-20181218153428-b84716841b82
go: finding golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
go: finding k8s.io/utils v0.0.0-20190923111123-69764acb6e8e
cat: '.testoutput/*.regular.output.txt': No such file or directory
make: *** [Makefile:123: parallel_test_junit_report] Error 1
Uploading artifacts...
WARNING: out/junit/report.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
helper images Prebuild The script exceeded the maximum execution time set for the job
 ---> 4c24439f9bb3
Step 5/8 : COPY ./scripts/ /usr/bin
---> 01026ba0417e
Step 6/8 : COPY ./binaries/gitlab-runner-helper.x86_64 /usr/bin/gitlab-runner-helper
---> 9c98c5fae37b
Step 7/8 : RUN echo 'hosts: files dns' >> /etc/nsswitch.conf
---> Running in 3fc12779e754
Pulling docker image gitlab/gitlab-runner-helper:x86_64-1b659122 ...
ERROR: Job failed: execution took longer than 2h0m0s seconds