Ripped code from system/widestrs made more flexible with primitive types. This makes conversion between UTF-8 and UTF-16 much easier, possible to do at compile-time, and involve less allocations. These are possible to use at compile-time, as opposed to system/widestrs.newWideCString, which uses raw allocation. Raw allocations are not permitted in nimvm.