i18n: Much better compat impl of mb_* funcs

The original compatibility functions for the `mb_strlen`, `mb_strpos`, and `mb_substr` functions was not implemented correctly. This patch uses the PCRE library to do Unicode processing