Fix lev_distance
auto merge of #17738 : hoeppnertill/rust/master, r=alexcrichton

There is an issue with lev_distance, where
```
fn main() {
    println!("{}", "\x80".lev_distance("\x80"))
}
```
prints `2`.

This is due to using the byte length instead of the char length.