Cluster performs a clustering of images in the pile p to create a collection
of piles where image ends are within h times the images length of the ends of
the generated sub-pile. Clustering is seeded by the set of unique image intervals
in order of decreasing depth.