Change the midpoint data a bit

Store the ways which share the segment and the index of
the segment. This will be used in both DragWay and Draw
behaviors.
Extract AddMidpoint action