rustc: avoid `use`-ing `syntax::ast::*`.
rustc: middle: rename `ty::t` to `Ty` and use it unqualified everywhere.
rustc: middle: ty: replace unsafe pointers with references in Ty.
rustc: fix fallout of adding the `'tcx` lifetime to `Ty`.
rustc: fix fallout of making `Ty` an alias for `&TyS` instead of a wrapper.
rustc: middle: avoid clones in ty_fn_{sig,args}.
rustc: middle: remove obsolete ty::get.
rustc: middle: simplify primitive type declaration in ty.
rustdoc: fix fallout of ty::t -> Ty<'tcx>.
auto merge of #18483 : eddyb/rust/safe-ty, r=nikomatsakis

After more than a month of sitting on this patch, rebasing and tracking down some nasty bugs (there's might be still one out there, but it only manifested in `middle::trans::reflect` which is now gone), I'd like to merge it as it is.

This changeset makes middle::ty safe, linking the lifetime of a type to the type context it was created in.
It's a prerequisite for introducing function-local type contexts to localize types with inference variables, in order to (potentially) free hundreds of MBs from rustc's memory usage peak.
Refactor QPath to take an ast::TraitRef