Don't just report which script error occurred, but which in which input of which transaction,
and which UTXO was being spent.
This is a partial backport of [[https://github.com/bitcoin/bitcoin/pull/31112 | core#31112]]
https://github.com/bitcoin/bitcoin/pull/31112/commits/7b267c034fdc2c8cb964a763f182ff98a75ba2ac
Depends on D18877