Make iteration ordering predictable.
The order of iteration over a std::unordered_map is undefined, and can and does change between compiler implementations, and between different versions of the same compiler. (In particular, it changes going from gcc8 to gcc10.)
PrecedenceRulesGraph has a few places where it iterates over an unordered_map, and this ordering is visible externally. Add a separate sorting step in those cases so that the ordering will always be the same.
Edited by Scott Snyder