fix mbstring wrapper utf8_substr() mistake, and update the utf8_* helper...

fix mbstring wrapper utf8_substr() mistake, and update the utf8_* helper functions to make them behave correctly.