Windows: fix spawning commands with spaces

Fix spawnning command under Windows when they contain spaces in both
the executable and the arguments.  Apparently system() quoting is
unexpected, and doesn't work properly if there is more than 2 quotes
in the whole command.

To work this around, spawn the command through `cmd.exe /S /C`.
Windows: add a debug to show the command as it is run
Windows: convert the spawned command to locale encoding

Converting to locale encoding is required to allows non-ASCII
characters in the command, e.g. in the file names.
Windows: properly initialize errno before checking it

errno is never reset to 0 by the system libraries, so if we test
its value we need to reset it to 0 before the call that may change
it to something else.
Merge branch 'win32-quote-spawn-args'

Closes bug #943 and PR #180.