Text helper: convert_accented_characters() optimization

Thanks to static variables, array_keys() and array_values() are now executed once only.
Merge pull request #2294 from vlakoff/develop-2

Text helper: convert_accented_characters() optimization