Fold `MethodOrigin`s to resolve inference variables they may contain.
Fixes #17662.
auto merge of #17663 : eddyb/rust/method-origin-subst, r=nikomatsakis

Fixes #17662.