Check for missing undo files at startup, making the check somewhat more ...

...efficient.

This is also an incremental step in making an index pruner for #4481
Now that this has been moved to the end of the function, consider factoring it out to a separate function (eg. `CheckForBlockFiles()`) and calling that separately. After all, this is not part of loading the block index DB.