Refactor llvm/test/lit.cfg to use lit.util.which.