Honour variance when computing self parameter substitution

Currently, rustc only applies variance rule for region substitution.
Applies the same rule to self parameter substitution.

Closes #12223.
For review only: apply variance rule to type parameters