Avoid flipping longitude near ±π.

When computing the midpoint between two points both at longitude -π, there was a
chance that atan2 would return +π rather than -π. Now, we check whether the
points to interpolate lie (approximately) on a meridian; if they do, we can
approximate by using linear interpolation of longitude rather than atan2. This
fixes #1635 which was caused by new trig implementations in Chrome Canary.