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.