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)]`
The natural word size of an architecture is not a well-defined concept, e.g. the x32 ABI has 32-bit pointers (and thus 32-bit Rust-`int`s) on x86-64 CPUs.