Part of #35627 and kernel-node/kernel-node#111. The kernel can't open a data directory that a pruned node created, and it has no way to prune.
This adds a prune option on the block manager, btck_block_manager_prune_up_to_height and btck_chainstate_manager_flush. With the option set, the kernel opens pruned data directories. The chainstate manager created with the block manager decides what may be deleted, so pruning fails without one.
Pruning writes only block storage, never the chainstate. After an unclean shutdown the chainstate on disk is at the last flush, and recovering from there needs the blocks above it. Pruning therefore keeps every block above the fork point between the last flushed block and the active chain, and reports btck_PruneStatus_NEEDS_FLUSH when that bound limited what it could delete. The caller can flush and prune again.
The fork point matters when the flushed block was reorged out. Recovery then disconnects the stale blocks, which needs their block and undo data, and connects the new ones from their block data. btck_block_manager_prune_reorg_tests covers that case and fails if the bound uses the flushed block's height instead.
A fast prune option lets tests prune, since test chains never fill a 128 MiB block file.