Move rustrt::last_os_error into core

No need for it to be in written anew in rustrt since LLVM already provides a platform independent way of getting the error string. This pull request just makes it available in core::os.

So that's one less helper function in rustrt. (#4812)