improve handling of NXtomo of darks and flats series.
Today an NXtomo frames are defined by a list of keys (ImageKey) specifying if those keys are dark, flat, projection, invalid... See image key in https://manual.nexusformat.org/classes/base_classes/NXdetector.html.
For the processing side we want to group darks and flats by series (at the beginning or at the end of a scan) For now we consider we are still in the same serie as long as the image key type is not changing.
But for example if we want to invalidate a dark or a flat this will create two series instead of one. As those series have indices it can result that only second or the first part of a serie is used.
In practice dark or flat frames are not invalidated. As the median and the mean of those frames are computed.
Nevertheless this is still a bottleneck. 'invalid' could be ignored but this is also a convenient way to define sections...