Changed the way edges are constructed.

Edges now always have the vertex with the lowest id as source, and the other
vertex as target.