ir: Sort before combining adjacent ranges.
ir: Sort before combining adjacent ranges.

Previously, it was not guaranteed that the edge set was ordered,
but often were due to construction. Now that they're stored
in a hash table, they are more obviously unordered, and tests
started failing because the ranges did not combine. This does an
extra sweep after the sort and combines ranges where possible.

katef/libfsm,katef/libfsm,katef/libfsm,katef/libfsm,katef/libfsm