Make segment distance routines *mostly* robust

Segment-point, segment-segment, line-point, and line-line distance
computation should be now be as numerically stable as possible,
including optional computation of weights and normals (normalized
vectors between closest points).  The current segment-segment normal
computation is slightly flawed, and occasionally violates the KKT
conditions (see https://github.com/otherlab/core/issues/42).