Fix `ty_trait` variance inference bug

that variance inference pass doesn't take lifetime parameters and
mutability of a trait reference into consideration.

Note that `libserialize` won't compile duo to additional lifetime
variance constraints; the fix for that is not part of the commit. One
still gets a working stage1 rustc, though.
Incorporate variance into typeck

Implements RFC for tweaked variance inference rules.

Note the `libarena` won't compile as discussed in IRC. It makes an
interesting case for RFC so the fix for it is not included. A working
stage1 rustc can be built without the fix anyway.
Fix fallout for stage1
Fix fallout for librustdoc