Numerically more stable version of geodesic_length
Merge branch 'dev' of https://github.com/PetterS/curve_extraction into dev