Retire rank_distance()

Use instead the generic function dist<T>(T, T) when T = Rank.

No functional change.
Retire file_distance()

Use instead the generic function dist<T>(T, T) when T = File.

No functional change.