Properly support UCS4

Issue #178 new
Kaya Kupferschmidt
created an issue

Currently no UCS4 is supported properly. The idea is that all strings are handled to be UTF16 (and not UCS2 which is the current state). This involves rewriting many of the string conversion routines, also those which rely on UCS2 encoding (toUtf8, toUtf16 etc)