import-checker: try a little harder to show fewer cycles
This makes sure that all cycles begin with the lexicographically first
module, so that we're less likely to show overlapping cycles in the
final analysis.
contrib: add an import checker
This checks for cycles in the module graph and verifies that imports
of stdlib modules are not on the same line as relative imports of
mercurial modules.