This is not enough for building to WASM, but wanted to split out the
bigger changes into their own PRs. This is mostly busy-work.
One serious bug fixed:
* u16string_from_string was not converting from UTF-16 correctly
Apart from that, just tidies up a few bits and pieces in kmcmplib:
* type coercion for json-validator.cpp (probably already fixed upstream)
* cleanup of build scripts for new builder variable names
* various compatibility macros for MSVC vs clang
* safer math expressions
* file name casing in headers
* replacement of various ms-only std funcs
* removed some unused variables and consts
* tightened up search for keyboards to get only keyboards in /source/
folders (may be possible to improve further in the future?)