rustc: move type definitions from middle::freevars to middle::ty.
rustc: move freevar finding to resolve.
rustc: remove Gc<Def> and depth from DefUpvar.