librustc: Enforce privacy for static methods.

This starts moving a bunch of privacy checks into the privacy
checking phase and out of resolve.

r? @nikomatsakis