Enforce minimum sample interval for resampling.

The minimum sample interval is somewhat arbitrarily set to 16 × δ, where
δ is the Douglas–Peucker threshold.  This fixes cases where resampling
stops too early due to the perpendicular distance being below the
threshold; particularly for points that are far apart and whose
great-circle arc is projected to an S-shape.  The midpoint lies along a
straight line, failing the Douglas–Peucker check, but further resampling
produces an S-shape.

Ideally, resampling should also detect cases where an intermediate point
does not need to be drawn, i.e. where there truly is a straight line.
This fix causes points to be drawn at the minimum sample interval, and
thus may degrade performance slightly due to drawing redundant points.

Fixes #1162.
Avoid drawing redundant points when resampling.
Merge branch 'resample-min' into 3.2