Detect polygons surrounding clip extent.

Also, fix interpolation for points on the same clip edge that need interpolating the long way around.

See #1114.