Since the previous commit, CBlockHeader/CBlock object calls to the
methods `.rehash()` and `.calc_sha256()` are effectively no-ops
if the returned value is not used, so we can just remove them.
This is a partial backport of core#32868
https://github.com/bitcoin/bitcoin/pull/32868/commits/8b09cc350afac05d22c7c87433d376654f3ce403
Depends on D18738