Add libc::errno and libc::set_errno and use to implement std::os::errno

This pull request does the following:

  - adds two functions `libc::errno() -> c_int` and `libc::set_errno(c_int)`
  - implements `std::os::errno` using `libc::errno`
  - removes the currently disparate signatures for `std::os::errno()`, which returns `int` on unix and `uint` on windows, in favour of returning `int` only.

This represents a reopening of previously discussed PR #17265.