Prefer where clauses to impls in trait resolution (not vice versa).

Fixes #18453.
auto merge of #18494 : nikomatsakis/rust/issue-18453, r=aturon

Prefer where clauses to impls in trait resolution (not vice versa).

Fixes #18453.

r? @aturon