Move block-arrival information / preciousblock counters to ChainstateManager
Summary:
Block arrival information (and the preciousblock RPC, a related concept) are
both chainstate-agnostic, so these are moved to ChainstateManager. This should
just be a refactor, without any observable behavior changes.
This is a partial backport of core#27746
https://github.com/bitcoin/bitcoin/pull/27746/commits/471da5f6e74bac71aeffe2ebc5faff145a6cbcea
Depends on D17432
Note that nBlockSequenceId is atomic since D1958 (so we bypassed core#22824), and cs_main is not really needed when resetting it. But better to keep the lock in case future backports add more code to ResetBlockSequenceCounters (this is called only in tests)
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17433