[BUILD] Switch GNU Makefile based build to CMake.
[misc] Add missing 'restrict' in protoptypes.

Some functions using 'restrict' in header prototypes wre missing
the keyword in misc.c. This commit adds them.
[BUILD] #include <wchar.h> before providing own _wcstoi64() and _wcstoui64().

This fixes build in MS Visual Studio Express 2013.