Avoid range checks in HashMap::each()
Optimize the lookup of traits containing a given method

Currently, trait_info is a hashmap that allows a quick lookup of all
methods contained in a given trait, but we actually only use it to
lookup traits that contain a given method. Adjusting the map to support
the lookup we actually need gives a nice speed boost, reducing the time
required for the resolution step for librustc from ~2.6s to ~1.0s on my
box.
auto merge of #6646 : dotdash/rust/method_lookup, r=brson