Performance optimization for transliteration

1. Freeze the regex so it's not created every time
2. Move LOWER[char] to the top of the condition
3. Minimize hash searches

Performance boost is 2-3 times on short strings and 20-30% on long ones.