rpc: gettxoutsetinfo can specify hash_type (only legacy option for now)
Summary:
This is a backport of core#19328 [2/4]
https://github.com/bitcoin/bitcoin/pull/19328/commits/a712cf6f6801157667fcf36d1c498b6fff6d328a
Backport note: D507 kept the name hash_serialized instead of using hash_serialized_2 which was introduced in core#10426
Depends on D9978
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Subscribers: majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9979