Image scaling: feature gate based on avatar owner

We currently have a feature flag in place for dynamic image scaling, which uses a user gate. The user in question is the session user, i.e. the user sending the request for the rescaled image, not the user who owns the image being scaled.

Since (dynamic) image scaling comes with a number of security risks, we think it might be a good idea to allow an alternative toggle instead enables the scaler for a given list of allowed avatars (based on avatar ownership.) That way we could activate the feature for specific images (e.g. my personal avatar) and allow a much wider range of session users to request it. The rationale here is that we can trust avatars uploaded and owned by selected groups of individuals (e.g. GitLab employees) more than the general set of users on gitlab.com.

Ideally both feature toggles should operate side by side, so that we can rely on one or the other depending on need.

Edited by Matthias Käppler