reproduce_ci_env better detects which stage a job is for

Previously stages like `doxygen` wouldn't be detected by
reproduce_ci_env as they didn't start with `build:` or `test:`.
Now we properly look for the `stage` key.
31 jobs for !2117 with gitlab_ci_doxygen (queued for 11 seconds)
merge request
Name Stage Failure
test:rhel8_test_centos7 Test
   Uploaded: /builds/gitlab-kitware-sciviz-ci/build/Testing/20200603-1356/Test.xml
Submission successful
-- Test submission build_id: 6570672
CMake Error at /builds/gitlab-kitware-sciviz-ci/.gitlab/ci/ctest_test.cmake:45 (message):
Failed to test

Authenticating with credentials from /root/.docker/config.json
ERROR: Job failed: exit code 1