Avoid false ambiguity in multidispatch trait resolution

Only consider impliciy unboxed closure impl if the obligation is actually for `Fn`, `FnMut`, or `FnOnce`.

Fixes #18019

r? @pcwalton