Memory efficient for DistanceForStrings
Memory efficient for DistanceForStrings

`DistanceForStrings` previously computed the entire edit matrix, but only used
the last entry in the matrix. Given the loop of the edit matrix algorithm only
uses the current row and the previous, we only need to store 2 rows of the edit
matrix to calculate the same value. This reduces memory consumption from `O(nm)`
to `O(n)`.

This implementation also transforms the input such that we get the smallest
possible row. this further reduces memory consumption to `O(min(n,m))`.

texttheater/golang-levenshtein