[addrman] Make addrman consistency checks a runtime option
Summary:
Currently addrman consistency checks are a compile time option, and are not enabled in our CI. It's unlikely anyone is running these consistency checks. Make them a runtime option instead, where users can enable addrman consistency checks every n operations (similar to mempool tests). Update the addrman unit tests to do internal consistency checks every 100 operations (checking on every operations causes the test runtime to increase by several seconds).
Completes backport of core#20233:
https://github.com/bitcoin/bitcoin/pull/20233/commits/a4d78546b0858602c60c03fdf8b35ca666ab2e56#diff-259675a17ed61244b5f1f5857285bdab63cc81f41334ed64c74ba623b61cf2a2
Includes a fix to prevent the build from failing on 32 bits platforms.
Depends on D12271.
Test Plan:
ninja all check ninja bitcoin-fuzzers
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D12272