Add blanket impls to allow the various `Fn` traits to be interconverted.

Fixes #18387.