levenshtein distance/alignment updated

remix of https://github.com/Hoverbear/rust-rosetta/pull/268

only few cosmetic changes to make it compile and address my own comments on the original commit. 
cc @yen223  (I saw you're already on the list of authors on Cargo.toml but I wanted to credit you in the new PR)