Implement Preloaders::RunnerPolicyPreloader

Given the recent improvements in Ci::RunnerPolicy, where we started delegating user level checks to the .owner's GroupPolicy and ProjectPolicy, we should implement a Preloaders::RunnerPolicyPreloader, similar to Preloaders::RunnerManagerPolicyPreloader. In this preloader we could leverage Preloaders::UserMaxAccessLevelInGroupsPreloader and Preloaders::UserMaxAccessLevelInProjectsPreloader to precompute the permission by calling @user.can?(:admin_runner, scope) on each of the resulting groups/projects.

We could also use DeclarativePolicy::PreferredScope#user_scope to signify that we're looping through permissions against the same user, but I don't think there is any practical impact from that.

We should then replace calls like https://gitlab.com/gitlab-org/gitlab/blob/master/app/services/ci/runners/bulk_delete_runners_service.rb#L56, which are out-of-date now.

References:

Edited by 🤖 GitLab Bot 🤖