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
Check the size of files reported on memory, and compare it with the size registered on disk.
Fail if the prefix passed to RemoveDiskFile is unknown.
Set size to 0 in block files info after removing the files.
Do not try to read the files if their size is zero.
Do not warn about size measure differences during IBD, reindex and loading of blocks.

In those cases the differences are somewhat expected.
Parameterize the acceptable ratio of size divergence, and adjust it for IBD, reindex and loading.
Always log ratio and other parameters to Monitor its behavior.
Add a lock before writing to blocktree.
Fix IsInitialBlockDownload which was broken by headers first.
Try not to disable NODE_NETWORK to see if that makes pull tester happy.
Enable autoprune by default (this is to check pulltester in travis).