Make Hash[160] consume range-like objects
Summary:
Completes backport (8/8) of core PR19326:
https://github.com/bitcoin/bitcoin/pull/19326/commits/77c507358bda9bd6c496f33e0f4418c0603bb08d
Depends on D9156.
There is a missing dependency for the walletdb.cpp change for which I
left a comment to make the later backport easier.
This diff also contains a few changes which are specific to our repo.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Subscribers: majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9154