search: sync access `calledSearchFilesInRepos` mock
Created by: keegancsmith
We call searchFilesInRepos
twice in a normal search request. Once for files and once for file contents. This means the mocks we use in tests need to protect against concurrent access. CI picked up a test having race condition. This PR switches us to using an atomic value.
Each commit is a self contained refactor using comby, getting us to a final state of using atomics.
Note: Technically we should validate which searchFilesInRepos we are calling (ie for file paths or not). However, these sort of conditions are somewhat low value. So rather than doing a bigger change I just fixed the race condition.