libnative: generic retry() for 64 bit read/write().
libnative/io: clean up some of module imports.
auto merge of #17020 : nodakai/rust/libnative-c_int, r=alexcrichton

The current implementation of `retry()` cannot handle, say, `write()` of >2 GB data because it truncates the return value of the closure parameter into `c_int` which is (almost always) only 32 bit.

This is my first code to use traits... I hope `#[inline]` works as intended.

I think `mkerr_libc()` is still causing bugs here and there;  I'll fix them later.