rustc: middle: ty: replace unsafe pointers with references in Ty.
rustc: fix fallout of adding the `'tcx` lifetime to `Ty`.