Overwrite dist<Square>(Square, Square)

Seems natural: if we define `dist(T, T)` for any type `T`, then we expect it
to coincide with `square_distance()` for `T = Square`.

Also retire `file_distance()` and `rank_distance()`, and we use a single generic
`dist()` function all over the code!

No functional change.
Ditto, this line should be removed