Change method lookup to require invariance for mutable references

Fixes #17033.
Fixes #15965.
auto merge of #17130 : jakub-/rust/issue-17033, r=pcwalton

Fixes #17033.
Fixes #15965.

cc @nikomatsakis