Caching layer for HDF5 file/dataset handles
Since datatemplate, the masks for each panel are treated separately and we close the HDF5 handles after loading each one. With EuXFEL files with 128 separate VDS files (!), this causes an unacceptable overhead.
The best way to fix this seems to be to add a caching layer, where HDF5 handles can be re-used while within the panel loop in create_badmap. This involves changing the HDF5 API (image_hdf5_read_mask), but this isn't part of the public API anyway.