Fix flaky test TestInfoRefsUploadPack_cache
TestInfoRefsUploadPack_cache is flaky as it creates the invalid repository in a shared directory that other invocations of the same tests with different feature flags use. Fix this by creating the invalid repository correctly in the tests own storage directory. As the repository is now in the correct location, the request fails with an internal status code as Git fails to work on the invalid repository.
Remove the unnecessary test helper that is a leftover from the time all tests shared a global storage.
Closes #5635 (closed)