Using semistable swap strategy dramatically speeds up sorting
of head/tail indexes.  This comes at a cost in memory usage.

A productive strategy here is probably to use insertion sort
for single-edge addition, and an alternative for multi-edge
addition.
Rearrange code order a little and add some useful attributes.
Default Makefile should probably not be in release mode :-)