Relax lifetime bounds on Reader/Writer impls for trait boxes

Cargo needs this to be able to instantiate `TerminfoTerminal<Box<Writer+'a>>`
for 'a other than 'static.
Fix whitespace and missing parentheses.
Have std::io::TempDir::new and new_in return IoResult

This allows using `try!()`

[breaking-change]

Fixes #16875
std: branchless bucket distance for hashmap
std: RawTable exposes a safe interface for HashMap

Introduced a new growth algorithm.
std: Split hashmap.rs into modules
std: Refine and document HashMap's code

* branchless `bucket.next()`
* robin_hood is a free function
* fixed the resize policy that was off by one
* documented the growth algorithm
* updated documentation after interface changes
* removed old fixmes
std: Fix overflow of HashMap's capacity
collections/slice: Reexport mut_ref_slice in addition to ref_slice.
Update language item from 'share' to 'sync' #16988
Work around inability to link lifetime of ref bindings (#16994)
Check concrete type in impls with no trait

closes #16955
auto merge of #16843 : bkoropoff/rust/reader-writer-box, r=alexcrichton

Cargo needs this to be able to instantiate `TerminfoTerminal<Box<Writer+'a>>` for 'a other than 'static.
rustdoc/html: emphasize the crate part of the full path.
auto merge of #16775 : jbcrail/rust/fix-rational-docs, r=pcwalton

Minor corrections to Rational documentation.
make CrateContext fields private
split CrateContext into shared and local pieces

Break up `CrateContext` into `SharedCrateContext` and `LocalCrateContext`.  The
local piece corresponds to a single compilation unit, and contains all
LLVM-related components.  (LLVM data structures are tied to a specific
`LLVMContext`, and we will need separate `LLVMContext`s to safely run
multithreaded optimization.)  The shared piece contains data structures that
need to be shared across all compilation units, such as the `ty::ctxt` and some
tables related to crate metadata.
move back::link::write into a separate file
run optimization and codegen on worker threads

Refactor the code in `llvm::back` that invokes LLVM optimization and codegen
passes so that it can be called from worker threads.  (Previously, it used
`&Session` extensively, and `Session` is not `Share`.)  The new code can handle
multiple compilation units, by compiling each unit to `crate.0.o`, `crate.1.o`,
etc., and linking together all the `crate.N.o` files into a single `crate.o`
using `ld -r`.  The later linking steps can then be run unchanged.

The new code preserves the behavior of `--emit`/`-o` when building a single
compilation unit.  With multiple compilation units, the `--emit=asm/ir/bc`
options produce multiple files, so combinations like `--emit=ir -o foo.ll` will
not actually produce `foo.ll` (they instead produce several `foo.N.ll` files).

The new code supports `-Z lto` only when using a single compilation unit.
Compiling with multiple compilation units and `-Z lto` will produce an error.
(I can't think of any good reason to do such a thing.)  Linking with `-Z lto`
against a library that was built as multiple compilation units will also fail,
because the rlib does not contain a `crate.bytecode.deflate` file.  This could
be supported in the future by linking together the `crate.N.bc` files produced
when compiling the library into a single `crate.bc`, or by making the LTO code
support multiple `crate.N.bytecode.deflate` files.
reuse original symbols for inlined items

When inlining an item from another crate, use the original symbol from that
crate's metadata instead of generating a new symbol using the `ast::NodeId` of
the inlined copy.  This requires exporting symbols in the crate metadata in a
few additional cases.  Having predictable symbols for inlined items will be
useful later to avoid generating duplicate object code for inlined items.