try to make r_io_mread work as expected

I hope that this is correct. I expect mread to read len bytes from map at maddr, or unitl the end of map if len + maddr is greater than map->to, and then return the number of bytes read.

I hope that my comments help others, who want to help fixing io or just want to understand io-code.