Change the way segments, points and handles are selected and deselected.

There is no interdependency anymore, except for selecting a segment selects the point and both handles, and selecting a curve selects both points and handles.

Closes #355