Computes whether the given point lies inside the specified polygon.
The polygon is always considered closed, regardless of whether the last point equals
the first or not.
Inside is defined as not containing the South Pole -- the South Pole is always outside.
The polygon is formed of great circle segments if geodesic is true, and of rhumb
(loxodromic) segments otherwise.
Computes whether the vertical segment (lat3, lng3) to South Pole intersects the segment
(lat1, lng1) to (lat2, lng2).
Longitudes are offset by -lng1; the implicit lng1 becomes 0.