Retry job when exit_codes

Proposal

GitLab's CI yaml reference includes the ability to limit the allow_failure specification to certain exit_codes. See: https://docs.gitlab.com/ee/ci/yaml/#allow_failureexit_codes

It would also be useful if that same strategy was available for the retry part of a job spec. See for an example:

test:
  script: rspec
  retry:
    max: 2
    when:
      exit_codes:
        - 137
        - 255

If this feature were implemented, the test job would retry up to 2 times, but only when the previous failure's exit code was 137 or 255. This can specifically be useful if a job does something where you expect that a failure may happen transiently. Ideally there are no transient errors in CI jobs, but when your job relies on something externally, say Alpine's package repositories, and the job fails because the CDN showed as being down for a moment, this job might succeed on the second try.