Keep the edge order in json output
This PR sorts the edges by AGSEQ to keep the order in json output.
We can reproduce the order issue with the test graph rtest/graphs/b58.gv
In existing json output, the third edge is "7 -> 4" rather than "7 -> 5".