osdep/io, mp_vfprintf: split out console detection
Windows: use the GUI subsystem, attach to console

This is necessary to start mpv without forcing a console window,
but also breaks console usability. A workaround is to call mpv
from a wrapper process that uses the console subsystem and helps
redirecting the standard streams and WriteConsole output to where
they belong.
Add Windows console wrapper program (mpv.com)