Refactored distance() and corrected path()

Refactored distacen() so that it now accepts the lengths of the ranges
because we already calculate these in levenshteinDistance().

Altered ss in distance() and tt in distanceWithPath().

Moved popFront()’s to after their final usage to handle transitive
ranges.

Corrected path() so that it calls distanceWithPath() instead of
distance().