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.
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
Allow trailing commas in bitflags! macro
Test attributes
Attach documentation to the bitflags! macro itself

This is in consistent with the style demonstrated in the std::macros module.
Use {} for bitflags! definition and invocations

This looks nicer because it reflects Rust's other syntactic structures.
Auto-derive Clone for syntax::diagnostic::Level.
auto merge of #16986 : bjz/rust/bitflags, r=alexcrichton

Closes #16469
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
Work around inability to link lifetime of ref bindings (#16994)
auto merge of #16990 : DiamondLovesYou/rust/level-derive-clone, r=alexcrichton
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.
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