[MATH-749] Change the way the line segments are computed as they can not be serialized. Use the array only as cache and create them as needed.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1566064 13f79535-47bb-0310-9956-ffa450edef68