Function to implement the custom SQLite collation 'CASEFOLD'.
Uses utf8 case-fold to compare the strings.