PipeCTool ends when clicking onto a second element

Now when we click onto the end element of the pipe,
edition automatically ends and saves the new line.
EndGeometryListener fixed.

It was not properly removing the CAD listeners
and setting a non-CAD tool.