Consistently check public code permissions
Created by: ryanslade
This change consistently checks whether a user can add public or private code by first looking at site config and only falling back to user specific tags if the user is logged in or exists.
The CurrentUserAllowedExternalServices
method was moved from
frontend/internal/search/repos
into the database package.
If a user is not logged in or is invalid we always fall back to the site level setting.
In the web code we also check for the AllowUserExternalServicePrivate
tag so
that when we start opting users in we don't hide the new UX elements.
Closes: https://github.com/sourcegraph/sourcegraph/issues/19931