path: fix Difference sometimes not closing the path

distance_bez_shape_point() was miscalculating the distance of
non-closed path making selection harder. Now handled because
such path can be created by other means, too.

_curve_from_segment() did not correctly flip a line-to, the
remaining changes should simply increase readability (typos,
documentation updates)

unrelated: stdpath_get_object_menu() make "Show Control Lines"
a toggle menu.
[autorouting] Toggling autorouting and undo, fix number of points

The recent crash fixed with c865c8b87e0cd774c75131d913ac53bfd156c69b had
also some visible effect when toggling auorouting for a fresh D&D
"UML - Component Feature". Switching the autorouting of again by undo did
not restore the original number of points, because taht wasn't stored with
the change information.