ChainstateManager creates and owns its BlockManager, which means block storage can't exist without chainstate management. #35627 discussed moving that ownership out of ChainstateManager, and the kernel needs it to configure, read and prune block storage on its own.
NodeContext and the kernel now create the BlockManager first, pass it to ChainstateManager by reference and destroy ChainstateManager first.
The first commit makes the kernel's ChainMan destroy its ChainstateManager explicitly. On master ChainMan declares its context last, which destroys the context before the ChainstateManager that refers into it. Nothing reads through those references during teardown, so this changes no behavior, but the order no longer depends on how the members are declared.
The last commit removes ChainstateLoadOptions::prune. It duplicated the BlockManager's prune mode, and the kernel never set it. Once the kernel can prune (#36856), that would make it refuse to reopen a data directory it had pruned.
The only behavior change to my knowledge is startup log order, because the block tree database opens before the script verification threads start.
An earlier version of this PR also moved ImportBlocks and replaced BlockManager's friend declarations. I've taken them out as they're not relevant to this, but I think together better suited for a change that removes the node/blockstorage -> validation circular dependency (#36858)
The kernel side is #36854.