Allow us to set the buffer size for IO

This is used for network IO and in fact for all IO (including with stdin
and stdout). It defaults to 64K (even for stream protocols, which used to
default to 8K and which is not good enough on 10G Ethernet).