[doc][algorithms] add documentation for the comparable_distance free function that takes a strategy

The problem with the currently created page is that the function definition is too long (due to the very long description for the return type). Any ideas how to fix this?