Create curve-segment.js
Move more functions to CurveSegment
Define CurveSegment.getIntersectionsAndParameters function