Fixes #1726 (precision problems in intersectSegmentPolygon and intersectLinePolygon).

Replaces intersectSegmentPolygon and intersectLinePolygon "optimized"
implementations with the more robust implementations used for intersectLine and
intersectSegments