Implement Damerau-Levenshtein, closes #1119.

Fetching the keyboard layout seems to be impossible to do within the JVM
without shelling out. It's probably not worth it wrt. portability.
Test edit distance function.