Updating implementation of S2Polyline port and also considering different ways to port over required methods for implementing the geodesic loop and polygon