For the differences between this diff and the original commit, see:
- D1450: Introduce a BlockStatus class to encapsulate CBlockIndex's validation status
- D1654: Moved CBlockFileInfo class from chain.h into its own header
- D8319: Add routine to upgrade the block tree db to index block size
This concludes backport of Core PR17896 [3/3]
Depends on D8627