Here is a follow-up to #18002, again with the goal of simplifying (potential) BIP341 code.
Instead of passing a begin and end iterator of the initial stack to ExecuteWitnessScript, they are turned into a Span<const valtype>, representing a span of valtypes in memory. This allows VerifyWitnessProgram to operate on that span directly, instead of juggling iterators around (which would be exacerbated by #17977 if trying to avoid copying the stack).