Improve precision of Numerical.solveCubic() and fix issues in Curve.getCrossings().

Closes #202.