testsuite: Simplify and clarify performance test baseline search
The previous implementation was extremely complicated, seemingly to
allow the local and CI namespaces to be searched incrementally. However,
it's quite unclear why this is needed and moreover the implementation
seems to have had quadratic runtime cost in the search depth(!).