refactor: reimplement mkNoConfusionType in Lean (#10334)

This PR reimplements `mkNoConfusionType` in lean, thus removing the
remaining C code related to this construction.

Also uses the ctor elimination principles only when there are more than
three ctors.
5 files changed