std: migrate the errno -> IoError converter from libnative.

This also adds a direct `errno` -> `~str` converter, rather than only
being possible to get a string for the very last error.
rand: bubble up IO errors when creating an OSRng.
rand: bubble up IO messages futher.

The various ...Rng::new() methods can hit IO errors from the OSRng they use,
and it seems sensible to expose them at a higher level. Unfortunately, writing
e.g. `StdRng::new().unwrap()` gives a much poorer error message than if it
failed internally, but this is a problem with all `IoResult`s.
auto merge of #13115 : huonw/rust/rand-errors, r=alexcrichton

move errno -> IoError converter into std, bubble up OSRng errors

Also adds a general errno -> `~str` converter to `std::os`, and makes the failure messages for the things using `OSRng` (e.g. (transitively) the task-local RNG, meaning hashmap initialisation failures aren't such a black box).
rustc: fixed regionck for owned trait casts.

Regionck didn't do any checks for casts/coercions to an owned trait,
which resulted in lifetimes of the source pointer
to be ignored in the result of such cast.

This fix constraints all regions of the source type of the cast/coercion to be superregions
of each region of the target type (if target trait definition has some lifetime params),
or of 'static lifetime (if there're no lifetime params in target trait's definition).

Closes #5723
Closes #9745
Closes #11971