libnative: generic retry() for 64 bit read/write().

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.
Well, in this case `one` is just [a standalone function](https://github.com/rust-lang/rust/blob/67b97ab6d2b7de9b69fd97dc171fcf8feec932ff/src/libcore/num/mod.rs#L155-L156) that wraps the trait. The actual trait method would be called like `One::one()` and that currently doesn't allow for type hints (requires [UFCS](https://github.com/rust-lang/rfcs/blob/master/active/0046-ufcs.md)).

Also, the style is for functions to be called module-qualified, e.g. import `use std::num;` and call `num::one()` and `num::zero()` (although that can actually just be `!ret.is_zero()`). In this case, you can use the `mod` sugar for imports, like `use std::num::{mod, One, Zero};`, which brings those to traits into scope, as well as the module (i.e. the `mod` is equivalent to `use std::num;`)