std: change BufWriter to return ShortWrite/EndOfFile

The inner loop of BufWriter::write was carefully tuned to compile
down to roughly the speed of memcpy for writes between 4-32 bytes.