std: Chunk writing to stdout on windows

This just takes a similar approach to reading stdin on windows by artificially
limiting the size of the buffers going in and out.

Closes #14940