Fix issue 10568 CTFE rejects function pointer safety casts

We need to check for function pointer covariance
Merge pull request #2319 from donc/ctfeCastSafety

Fix issue 10568 CTFE rejects function pointer safety casts
Merge pull request #2316 from 9rnsr/fix5911

Issue 5911 - Closure destroys the thrown Exception
fix Issue 10567 - Typeinfo.compare has unreasonable signature requirements on opCmp
optimize for opEquals