Improve the handling of tags and branches which contains a `/` when triggering CNG pipelines
See merge request gitlab-org/gitlab-ce!24465
(cherry picked from commit 16ab0050)
67dfd878 Use $CI_COMMIT_REF_SLUG in review-apps.sh
f8a10191 Use $CI_COMMIT_REF_NAME for tags in trigger-build