* Restore sync=true on STDOUT/STDERR streams
* Move mutation of STDOUT and STDERR streams to `redirect_io`
This isn't technically related to redirecting the STDOUT and STDERR
streams, but moving it here keeps all of the STDOUT/STDERR logic
together. It seems like a more natural place to put it.
* Add a test to ensure that STDOUT is flushed by default