Resolve tweaks A couple of small perf improvements, and some minor refactorings, all in `rustc_resolve`. r? `@petrochenkov`