Improve performance of repository size limit check
As seen in https://gitlab.com/gitlab-com/infrastructure/issues/1498#note_58135870, the performance of the check is poor enough that it can cause a push to time out.
In https://gitlab.com/gitlab-org/gitlab-ee/issues/3429 / https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4989, we improved the performance of the maximum file size push rule. We may be able to use a similar solution.