major stdio overhaul, using readv/writev, plus other changes