Cache coercion kinds and roles
Because we never inspect the structure of a coercion, it is easy to cache coercions' kinds and role at the top level, using something like this:
data Coercion = MkCoercion { coercionKind :: Pair Type
, coercionRole :: Role
, coercionRep :: CoercionRep }
data CoercionRep = -- the long, recursive datatype we have now
In the process, various role and type information currently stored in the recursive structure could be dropped.
This would make #8095 much easier.
See also #11735.