core: Rewrite last_os_error in Rust for unix and provide access to errno (unix) and GetLastError (windows).
core: Rewrite last_os_error in Rust for windows as well.
rt: remove last_os_error and adjust tests.
Long lines.