Backport EE refactorings for Protected Tag EE-only functionality
What does this MR do?
Backports refactorings from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1629, but not the actual feature.
Why
Cleans up the code a bit and minimizes differences between CE and EE
Acceptance criteria
-
Changelog entry added, if necessary