Replace current Win32 apis calls with wide version.

CMake now compiles if /DUNICODE is defined.
These changes also make it possible for the 8 bit encoding
to eventually be utf-8 instead ANSI.
Merge topic 'unicode-win32-apis' into next

c61fb83 Replace current Win32 apis calls with wide version.