Make CHash256/CHash160 output to Span
Summary:
Partial backport (7/8) of core PR19326:
https://github.com/bitcoin/bitcoin/pull/19326/commits/02c4cc5c5ddf61f98ee366a4bea8abc26de492bd
Depends on D9152.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9153