Remove duplicate ee code
This was generalized for usage in the new variable table design, see
https://gitlab.com/gitlab-org/gitlab-ce/issues/39118#note_53615249
Conflicts:
app/assets/stylesheets/pages/projects.scss
ee/app/assets/javascripts/protected_branches/protected_branch_create.js
ee/app/assets/javascripts/protected_tags/protected_tag_create.js
ee/app/views/projects/protected_branches/ee/_dropdown.html.haml
Reduced the technical debt around our JS flash function by making it a
module that is imported rather than relying on the global function.
The global function still exists mainly for technical debt with how
some requests are being completed, but new JS should import the module
directly.
Also reduces some tech debt in the file by removing the need for jQuery.
Instead Flash is now 100% vanilla JS.
Improvements and refactorings were made while adding role based permissions for protected tags to EE. This doesn’t backport the feature, but should improve code quality and minimize divergence.