Implement autoprune

Main changes on this mode:

* Periodically check presence of needed block files.
* Automatically prune old block files if -pruned is set.