ci: allow defining $hg_branch to update to using an environment variable

GitLab CI/CD variables page says that "Variables set in the GitLab UI are not
passed down to service containers", but I think it only applies to variables
set in project settings, because HG_BRANCH works correctly when set at the
point of creating a new pipeline manually.
8 jobs for topic/default/env-vars-ci in 20 minutes and 37 seconds (queued for 1 second)