Rather than txids (represented by the fields .sha256 and .hash)
being stateful, simply compute them on-the-fly. This ensures that
the correct values are always returned and takes the burden of
rehashing from test writers, making the code shorter overall.
In a first step, the fields are kept at the same name with @property
functions as drop-in replacements, for a minimal diff. In later commits,
the names are changed to be more descriptive and indicating the return
type of the txid.
This is a partial backport of core#32421
https://github.com/bitcoin/bitcoin/pull/32421/commits/a2724e3ea392cdbd5526735516862b17bf687624
Depends on D18711
Note that contrary to Bitcoin Core, Bitcoin ABC never uses the return value of CTransaction.calc_sha256() so we can remove it immediately.