Improve precision of Numerical.findRoot()
Fix issue in Curve.getLength() for linear curves with sub-ranges.

Closes #376.