std: io: flush stdout on stdin read from tty
auto merge of #12980 : cmr/rust/overhaul-stdio, r=thestinger

this comes from a discussion on IRC where the split between stdin and stdout
seemed unnatural, and the fact that reading on stdin won't flush stdout, which
is unlike every other language (including C's stdio).