The goal here is that the code that draws the targets should know better
what parts of the lines/vertices are targetable, rather than just
relying on CSS to ignore the pointer events on the whole line.
e.g. when drawing a line, it's ok for it to loop back and connect
to itself, just not on a segment or vertex adjacent to the active
node.
These changes are needed now that `addNode`
* wants to preserve circularity
* automatically remove duplicates
* range checks index argument (can't call it with -1 anymore)