codeintel: add tests which cover sub-repo permissions filtering logic for references query
Created by: sashaostrikov
Add tests which cover logic for references query
Sub-repo filtering itself is implemented here
Should be merged after https://github.com/sourcegraph/sourcegraph/pull/29328
Closes https://github.com/sourcegraph/sourcegraph/issues/29239