Wraps all imports for select 2 to deferred imports,
especially in the main.js we are actually checking if there
is any select 2 element on the page or not.
Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/31271
When the dropdown items are too wide, constrain the dropdown to the
offsetParent. Otherwise, let it naturally flow as Select2 wants.