Preserve the region order when flushing a RegionSet

Related to limetext/lime#341.
I needed it to recurse until all the merges were complete, since if the lists aren't sorted, earlier regions might overlap with merged later ones.