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.
I think leaving file_distance in is worth it.  This expression is not so nice.