Build only well-kinded types in type checker
During type inference, we maintain the invariant that every type is
well-kinded /without/ zonking; and in particular that typeKind does
not fail (as it can for ill-kinded types).
But TcHsType.tcInferApps was not guaranteeing this invariant,
resulting in Trac #14174 and #14520.
This patch fixes it, making things better -- but it does /not/
fix the program in Trac #14174 comment:5, which still crashes.
So more work to be done.
See Note [Ensure well-kinded types] in TcHsType

Further improvements to well-kinded types
The typechecker has the invariant that every type should be well-kinded
as it stands, without zonking. See Note [The well-kinded type invariant]
in TcType.
That invariant was not being upheld, which led to Trac #14174. I fixed
part of it, but T14174a showed that there was more. This patch finishes
the job.
* See Note [The tcType invariant] in TcHsType, which articulates an
invariant that was very nearly, but not quite, true. One place that
falisified it was the HsWildCardTy case of tc_hs_type, so I fixed that.
* mkNakedCastTy now makes no attempt to eliminate casts; indeed it cannot
lest it break Note [The well-kinded type invariant]. The prior comment
suggested that it was crucial for performance but happily it seems not
to be. The extra Refls are eliminated by the zonker.
* I found I could tidy up TcHsType.instantiateTyN and instantiateTyUntilN
by eliminating one of its parameters. That led to a cascade of minor
improvements in TcTyClsDecls. Hooray.