Levenshtein distance function for SQLite