insights: add sub-repo permissions checker to code-insights worker
Created by: sashaostrikov
As an initial implementation, sub-repo permissions are checked for every repo in search results of code insights search query. No caching (per repoID) is happening currently.
If repo supports sub-repo permissions, then search result related to this repo is excluded and the data point of this repo is dropped
Closes https://github.com/sourcegraph/sourcegraph/issues/27490
Test plan
I wrote unit tests for code-insights worker layer and database layer.