[lit] Expand late substitutions before running builtins
This enables the use of readfile substitutions for populating
environment variables. This is necessary in some compiler-rt tests.
Reviewers: pawosm-arm
Reviewed By: pawosm-arm
Pull Request: https://github.com/llvm/llvm-project/pull/165140