rustc: allow function pointers to be compared for equality.

Previously `extern` functions up to arity 5 had `PartialEq`
implementations in libcore, but this doesn't handle comparing against
`unsafe` functions, or larger arity functions.

Fixes #13385.