rustc: Don't panic on corrupt metadata

Fix a panic where the compiler was looking at stale or old metadata.

See #19798, #19772, #19757, #19744, #19718, #19691.
Path types to associated types with form `T::A`

Closes #18433
Review changes
Remove the double auto-ref on arrays/strings as receivers

Part of #18469

[breaking-change]

A receiver will only ever get a single auto-reference. Previously arrays and strings would get two, e.g., [T] would be auto-ref'ed to &&[T]. This is usually apparent when a trait is implemented for `&[T]` and has a method takes self by reference. The usual solution is to implement the trait for `[T]` (the DST form).
Move hash module from collections to core
Create a snapshot on top of 1b97cd3
auto merge of #19921 : FlaPer87/rust/snapshot, r=nikomatsakis

r? @nikomatsakis
auto merge of #19761 : nick29581/rust/coerce-double, r=nikomatsakis

Part of #18469

[breaking-change]

A receiver will only ever get a single auto-reference. Previously arrays and strings would get two, e.g., [T] would be auto-ref'ed to &&[T]. This is usually apparent when a trait is implemented for `&[T]` and has a method takes self by reference. The usual solution is to implement the trait for `[T]` (the DST form).

r? @nikomatsakis (or anyone else, really)
auto merge of #19789 : nick29581/rust/assoc-ufcs2, r=nikomatsakis

Closes #18433
auto merge of #19799 : alexcrichton/rust/stop-panicking, r=huonw

Fix a panic where the compiler was looking at stale or old metadata.

See #19798, #19772, #19757, #19744, #19718, #19691.
auto merge of #19800 : sfackler/rust/core-hash, r=alexcrichton

r? @alexcrichton
libs: merge librustrt into libstd

This commit merges the `rustrt` crate into `std`, undoing part of the
facade. This merger continues the paring down of the runtime system.

Code relying on the public API of `rustrt` will break; some of this API
is now available through `std::rt`, but is likely to change and/or be
removed very soon.

[breaking-change]
Refactor std::os to use sys::os
Allow args to work without rt initialization
Make at_exit initialize lazily
Remove rt::bookkeeping

This commit removes the runtime bookkeeping previously used to ensure
that all Rust tasks were joined before the runtime was shut down.

This functionality will be replaced by an RAII style `Thread` API, that
will also offer a detached mode.

Since this changes the semantics of shutdown, it is a:

[breaking-change]
Introduce std::thread

Also removes:

* `std::task`
* `std::rt::task`
* `std::rt::thread`

This commit completely changes the thread model (threads are detached by
default) and API (including park/unpark for blocking). It is a:

[breaking-change]

Closes #18000
Remove rt::{local, local_data, thread_local_storage}
Add blocking support module for channels
Remove rt::{mutex, exclusive}