History dependent semi_lex_compare/3

The discussion here has languished, but I thought it was too important to just let it fade away so I raised an issue (for posterity) - see system:compare/3 violates transitive ordering for rational trees (cyclic terms) · Issue #1159 · SWI-Prolog/swipl-devel · GitHub.

Feel free to add your own comments to this issue if you think I’ve misrepresented anything or left out something important.