[validation] Add detailed txin/txout information for script error messages
Summary:
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 core#31112
https://github.com/bitcoin/bitcoin/pull/31112/commits/7b267c034fdc2c8cb964a763f182ff98a75ba2ac
Also revert a temporary hack in checkqueue.h that was needed to work around a GCC 12 bug.
Depends on D18877
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18878