This increases the chance of detecting a bug in a simple fixed case
before a complicated random one that's harder to debug. It also allows
adding regression tests for bugs found later, if any.
Thanks to Amir Livne Bar-on for contributing this. It's about to be
used to build confidence in a rewrite of findloop.c in a followup
commit. I also expect that it will be useful later on for testing
other graph algorithms.
This patch is not Amir's original. I've polished the code in various
small ways. The biggest change is that when it outputs a failing
graph, the graph is printed in the form of an Untangle game id, in the
hope that that will make it possible to visualise easily while
debugging the problem!