Vs native optimizer fixes

Adds build fixes to the native optimizer code so that it builds on Visual Studio 2013. VS2013 has only partial support for C++11, and more specifically, unrestricted unions could not be supported. It looks like those are used only for memory footprint optimization, so not that critical?

Also adds a CMake script for manually building native optimizer on different platforms.
There is an assert three lines down, I think that should cover it? Although I think 256 is well enough always, since strlen(str) is at most two, and ceil(log10(32bit quantity)) <= 11, so I think size is small as <= 16 always.