Add ellipsoid geometry functions

These are taken from http://www.movable-type.co.uk/scripts/latlong-vincenty.html , and have been tested against the reference implementation. There were two bugs in the reference implementation, the tests use the corrected reference implementation.