librustc: Fix up mutability in method autoderefs if incorrect, and
prefer `Deref` over `DerefMut` in all other circumstances.

Closes #12825.