windows: update Read/Write to match the io contract

Write should write all bytes, or return an error.
Read should block until data is available, or return an error.