Add unicode support for console output on windows

Hints regarding the unicode support were taken from the libuv project, which
really helped.

Conflicts:
	src/base/system.c
Fix compilation on windows

const int wasn't detected as compile-time constant.
Only use WriteConsoleW if the intended output is the console

Conflicts:
	src/base/system.c