Add tolerance

Note that only the first and last coordinates of linestrings may be
snapped together. So in the test, (7 5) is snapped to (7.1 5), but
(4.05 4.1) is not snapped to (4 4).