This prepares the codebase for a Gitaly migration. See https://gitlab.com/gitlab-org/gitaly/issues/553