Fix race conditions for AuthorizedProjectsWorker
This MR fixes two race conditions that can lead to authorized projects not being populated properly.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/26194, fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/26310