Refactor startup checks onto a separate function.
Split the logic to check if a block file is readable to a separate function.
Add undo data to checks to be sure all required info is readable
Scan active chain instead of map of blocks
Prepare headers first for pruned mode
Add a switch to allow running in a pruned state

These are the main functional changes on this state:

* Do not allow running with a wallet or a txindex.
* Check for data at startup is mandatory up to last 288 blocks.
* NODE_NETWORK flag is unset.
* Requests for pruned blocks from other peers is answered with "notfound" and they are disconnected, not to stall their IBD.
Add a counter to log the range of pruned blocks
Implement autoprune

This mode introduces a configuration parameter to keep block files at less than a fixed amount of MB