Backport GitLab domain helper methods
Add GitLab.com domain helper methods that were added to EE on https://gitlab.com/gitlab-org/gitlab-ee/commit/6c25cadf36e7909fe0edaf03c228393d4b65a528 back to CE.
Add GitLab.com domain helper methods that were added to EE on https://gitlab.com/gitlab-org/gitlab-ee/commit/6c25cadf36e7909fe0edaf03c228393d4b65a528 back to CE.