Rewrite method resolution to be cleaner, more correct, and to lay
groundwork for better performance.

Key points:

- Separate out determining which method to use from actually selecting
  a method (this should enable caching, as well as the pcwalton fast-reject strategy).
- Merge the impl selection back into method resolution and don't rely on
  trait matching (this should perform better but also is needed to resolve some
  kind of conflicts, see e.g. `method-two-traits-distinguished-via-where-clause.rs`)
- Purge a lot of out-of-date junk and coercions from method lookups.
Substitute type/lifetimeInstatiate method type/early-bound lifetime parameters too when creating xform-self-type.

Fixes #18208.
Correct long line
Correct indentation
Port a simplified versions of pcwalton's "quick reject" mechanism for quickly throwing out method candidates. Yields a 40%-50% improvement in typechecking time as well as lowering peak memory use from 2.2GB to 1.8GB (due to creating fewer types).

Conflicts:
	src/librustc/driver/config.rs
	src/librustc/middle/ty.rs
	src/librustc/middle/typeck/check/method.rs
	src/librustc/middle/typeck/check/mod.rs
	src/librustc/middle/typeck/coherence/mod.rs
Use the quick reject mechanism during trait matching as well. Seems to
yield an incremental improvement (type-checking rustc drops from ~9s
to ~8s).
Fix merge conflicts from making enum variants namespaced.
auto merge of #18694 : nikomatsakis/rust/issue-18208-method-dispatch-2, r=nrc

This is a pretty major refactoring of the method dispatch infrastructure. It is intended to avoid gross inefficiencies and enable caching and other optimizations (e.g. #17995), though it itself doesn't seem to execute particularly faster yet. It also solves some cases where we were failing to resolve methods that we theoretically should have succeeded with.

Fixes #18674.

cc #18208
Place parenthetical notation under the `unboxed_closure` feature-gate.
Consolidate the `unboxed_closure_sugar` and `unboxed_closure` feature gates.
Pull out the fn-sig sub/lub/glb code and generalize it into a `higher_ranked` module. Also moves the docs to a more suitable place.
Switch the code to use De Bruijn indices rather than binder-ids.
Introduce some sanity checking assertions in trans, erase regions more aggressively.
Make it an error to use parenthetical notation with
something other than a trait type.
Convert TyPolyTraitRef to accept arbitary bounds, so that things like
`Box<for<'a> Foo<&'a T> + 'a>` can be accepted. Also cleanup the visitor/fold
in general, exposing more callbacks.
Stop checking the correctness of explicit self twice; instead, just
use simple pattern matching to take a guess at what the method's self
category is in astconv, and check it more thoroughly later.
Miscellaneous reformatttings and renamings.
Test resolving of names with `for` binders.
Introduce machinery for higher-ranked TraitRefs
Allow impl's to have late-bound regions. Introduces another level of
region binding at the impl site, so for method types that come from impls,
it is necessary to liberate/instantiate late-bound regions at multiple
depths.
Update tests for `()` notation to use traits not structs