Rename distance() to getDistance()

I also renamed distance4() to getDistance4().

The name distance was confusing with variables having the same name.
Remove unused variable distance from forEach callback
Exclude tiles beyond maximum distance

This completes and fixes step A of the algorithm:

  A) (...) Exclude tiles at a distance greater than the maximum distance.
No longer multiply computed distance by 4

The factor 4 is used in the underlying algorithm to compare
distance values with a precomputed integer threshold value:

  4r²+4r+1

At this step in the implementation, the distance values are only
used for sorting. The factor is no longer needed.
Do not publish intermediate values anymore

Now that the sequences are available, these values are no longer needed.