Fix Graph clone bug

Edges in bidirectional graphs wouldn't be accessible from both
Graph.edge(source, target) and Graph.edge(target, source) since
the Jquery clone thingy we were using wasn't copying references
properly. Instead a new graph gets built, where all the references are
in order.