[msvc] Fix a bunch of MSVC 14 compatibility issues.

Unfortunately, I've now hit the point where the lack of usable constexpr
support is the main issue, and there's just no reasonable way to work around
that without converting an absurd amount of code to template metafunctions.