StdIo: Restore Windows Console I/O modes on exit
The Windows documentation states:
command-line applications should capture the initial console mode at startup and attempt to restore it when exiting
We set ENABLE_VIRTUAL_TERMINAL_{INPUT,PROCESSING}
modes since !10759 (merged). Avoid leaking them.
Issue: #26924 (closed)