Add HashWriter without ser-type and ser-version and use it where possible
Summary:
The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version. So do this here for HashWriter. CHashWriter remains in places where it is not yet possible.
Backport of core#25331 and core#28341.
Test Plan:
ninja all check-extended
Reviewers: #bitcoin_abc, roqqit, PiRK
Reviewed By: #bitcoin_abc, roqqit, PiRK
Subscribers: roqqit
Differential Revision: https://reviews.bitcoinabc.org/D16472