Initial support for self loops

Works reasonably well, including support for labels on the self loops.
Problems:

- Nodes with self loops can't participate in rank constraints
- Self loops have minLen set to 1, instead of the usual 2. This is
  because we end up creating dummy nodes of dummy nodes.
Origin smoke test takes into acount edge coordinates
Support for nodes with rank constraints and self loops
Fix/add test cases for self-loops and sideways edges