rustc: Add the __tt_map_insert and __tt_map_get_expr macros

Behind the `__tt_map` feature gate. This feature name starts with
a double underscore to emphasize it's a hack, but there's no
precedent for naming features this way.
rustc: Introduce a new diagnostic code registry

This provides a way to create stable diagnostic codes, while keeping
the overal burden on compiler writers low, and introducing a way to
incrementally provide extended documentation of diagnostics.
Introduce more diagnostic infrastructure
Convert to new diagnostics

This pairs almost every error in libsyntax and librustc with an error code,
emitting with the macros:

* alert_fatal!(cx, code, fmt, args);
* alert_err!(cx, code, fmt, args);
* alert_warn!(cx, code, fmt, args);
* span_fatal!(cx, span, code, fmt, args);
* span_err!(cx, span, code, fmt, args);
* span_warn!(cx, span, code, fmt, args);
* resolve_err!(cx, span, code, fmt, args);

These macros call the methods 'fatal_without_diagnostic_code' etc. on any
given context. For the most part the old diagnostic methods on the various
sessions and handles and contexts have been renamed in a way that is
obnoxious to call (use the macros), but the macro ExtCtxt still contains
the simple `fatal` methods, etc. for ease of use by out of tree procedural
macros.

Lint errors are difficult to convert to this system because they don't use
string literals for reporting errors, so they don't have their own codes yet.
rustc: Add UI for extended diagnostics

When diagnostics with codes are emitted they appear in magenta brackets,
like `[A0002]`. After failure a note is emitted indicating whether
any errors had extended documentation and suggesting the `--explain help`
flag.