Add std::os::set_errno as a counterpart to std::os::errno

This pull request adds a `std::os::set_errno` function to allow rust to manipulate the thread's `errno` value.  In my particular case, I am needing to do this when interacting with a c-library I am wrapping.

Note I don't have rust building on a Windows platform currently so have been unable to test my implementation for `[cfg(windows)]`
I think it makes sense to expose `errno()` in `std` as an `int`, but have it be a wrapper around a `c_int`-based `errno()` in `libc`, and then `set_errno()` can go into `libc`.

The reasoning is that reporting the `errno` in error messages is not an uncommon thing, so having read-only access from `std` makes sense. Setting `errno` is much rarer, and presumably if you need that you're going to be doing other FFI work as well, so using `libc` is fine.