Fixes #3052. Adds a unit test for the edges API endpoint. To maintain a consistent order for testing, the returned rows in api/public/edges.go are now sorted.