Merge #10248: Rewrite addrdb with less duplication using CHashVerifier
Summary:
PR10248 backport https://github.com/bitcoin/bitcoin/pull/10248/files
cf68a48 Deduplicate addrdb.cpp and use CHashWriter/Verifier (Pieter Wuille)
backport note: had to add chainParams everywhere due to ABC style; in
turn static had to be removed from one member function so addrdb.h remains
unmodified.
Test Plan: make check
Reviewers: deadalnix, jasonbcox, Fabien, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D3582