When checking for existance of .done files the existance of viz_dir was
checked in some cases twice.
The function check_file_exists_in_dir checked the existence of the dir
*and* the file, and their respective existence was encoded somewhat
confusingly using (bool option, _) result.
make_iter__verify_completeness_of_latest_cachedir_if_done did many
different things. For both visualization types it would check that the
latest version exists and it is marked as done. Then if it's not done it
would return a noop-function. Otherwise, it would check if the expected
visualization file exists in the file system.
In this commit a new function has_completed is introduced that checks
the status of a vizualition and version pair (if it's done or not, or
Then verify_completeness is defined to check the visualization file
exists for a visualization type, version and build thruple exists.
In Verify_cache_dir.verify a list of visualization types and versions to
check is first determined. Then for every build every relevant
visualization type and version is checked.
Verify_cache_dir.verify is longer, but the other functions are smaller
and do less.