[test] lit.cfg: Wrap all substitutions with capture group refs in `SubstituteCaptures`
Since https://github.com/llvm/llvm-project/pull/103042, backslashes in
substitutions are consistently escaped on all platforms before feeding
the substitutions to the regex engine. Make sure all substitutions
containing capture group references are wrapped in `SubstituteCaptures`
to suppress this behavior once main is rebranched.