Assorted cleanup

Mainly:
Moving custom hangul syllable naming to shared func
utf8_strlen → g_utf8_strlen
Replace some snprintf with glib variants
Avoid using fixed char array during rewrite process