14042: Numerical stability of vtkPolyDataToImageStencil.

When clipping the polydata to create the contours for the stencil,
use use a new "EdgeLocator" class that identifies new points by the
edge that was cut to make the point: each edge is uniquely identified
by the point ids of two ends of the edge.  This is more robust than
using a PointLocator, because the PointLocator is limited by machine
precision and can therefore cause errors in the connectivity of the
output of the cutting operation.

Also improve the code that handles loose ends and branch points (bad
contour topology) because its heuristics failed in common cases: now
loose ends are preferably joined along the hull of the contour, and
short branches (spurs) that go nowhere are removed.  Vertical
inflection points are no longer marked, because the code in
vtkImageStencilData to handle tolerances for inflection points fails
for horizontal line segments.

Change-Id: Ie9248de960250f94f3613bd34d8890e20ce39f26
Merge topic '14042_polydatatoimagestencil_robustness' into master

88ab5f7e 14042: Numerical stability of vtkPolyDataToImageStencil.