Check block files after succesfully removing files.
Separate clearing of block files info to separate functions.
Clear the info about files remaining in the index when we find they aren't openable.
Simplify CheckBlockFiles routine.

We can do it now that the logic to avoid opening the files several times has been
moved to their own functions and is handled mainly through variables.
Merge branch 'autoprune' into testing