Record edge-to-element mapping.

For nodes, the top-level 'g' element is already recorded as
node.elem field. This patch makes the same done for edges.

The motivating example is highlighting a neighbourhood of a
node on hover - given a node I can easily traverse neighbours,
but to add a class to edge I need to know SVG element.