kdtree: Fix tree-building with near-identical tuples.

This degenerate case was causing ground-truth errors when
computing node positions. Fixed by arranging unique tuples
sequentially and ignoring identical ones.
kdtree: Add test_gck2, with match refinement.

Also compare vs old matching algorithm.
kdtree: s/get_positions/get_block_positions

Prep for the next commit.
kdtree: New find_positions that works with GCK.
kdtree: Simple matching using GCK, no propagation.
kdtree: Match by propagating immediate neighbors.

Surprisingly accurate (numerically) but doesn't look great
visually; propagating neighbors introduces a lot of color banding.
kdtree: Complete matching by propagation.

Seems only marginally better than patchmatch.
kdtree: Driver code to test all the new matches.