Avoid glibc iconv bug by using mb_convert_encoding

Iconv from Glibc 2.14 has a bug in handling the '//IGNORE' directive
which causes valid characters following the first invalid charter to be
skipped if the caller follows the documented semantics of their EILSEQ
error code [0]. PHP has effectively WONTFIX'ed working around this bug
in their iconv() implementation [1]. This makes the use of '//IGNORE'
with iconv basically useless. Luckily there is a work alike solution
documented by "orrd101 at gmail dot com" [2] that can be used to achieve
the desired result of stripping invalid characters from a string.

[0]: https://sourceware.org/bugzilla/show_bug.cgi?id=13541
[1]: https://bugs.php.net/bug.php?id=48147
[2]: http://php.net/manual/en/function.iconv.php#108643

Bug: 37665
Change-Id: Icf9e7deb73fdcea6ad074eb56153c5353064a929