PackIntoFrameRanges

Packs a list of frame numbers into a sorted array of frame ranges.