This is important to make sure that we're not testing tools different from the one we're building with.
Introduce determine_wellknown_cmd, which encapsulates how we should handle well-known tools specification (IFS splitting, env override, etc.).
This is a partial backport of core#22381
https://github.com/bitcoin/bitcoin/pull/22381/commits/9fdc8afe117b7b1ea845f8acae9e831922b8f92b