move-only: Move constants and functions to blockstorage
Summary:
This is a backport of core#21727 [3&4/4]
https://github.com/bitcoin/bitcoin/pull/21727/commits/fa7e64d58615fffea91cd64dc4a2790221ceff0a
https://github.com/bitcoin/bitcoin/pull/21727/commits/fadafab83379ff10d86ada179c6f9641d19464fe
Depends on D12033
Note: in a previous attempt to refactor validation code, we started moving stuff to a new blockdb.{h|cpp} module. This module did not have a dependency on validation.h, but blockstorage.h does have a circular dependency with validation. In order to avoid adding a new temporary circular dependency validation -> blockdb -> blockstorage -> validation, I decided to squash the two commits. The first commit is hopefully simple enough that this should not make reviewing too difficult.
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, sdulfari
Reviewed By: #bitcoin_abc, sdulfari
Differential Revision: https://reviews.bitcoinabc.org/D12034