Make nodes unique.

Each node must be unique, the node's label is the key that indentifies a
node.

- Some improvements to create nodes and edges.
Fix erase edge bug.

The correct way to detect if an edge is being selected is to check if
the point is on the segment a --> b, not on the line that passes by a
and b.