Add unicode support for console output on windows

Hints regarding the unicode support were taken from the libuv project, which
really helped.

Also thanks to @ertaquo for the original effort in issue #1063.
Only ending the string does not make clear that an decoding error arised, if anything one could try to continue parsing the rest of the UTF-8.