[Debug info] Emit bound generic class type parameters when emitting AST types
This relands commit 45d4648bdb9e1a9f1e3205556e653e203c55c06a while ensuring that
sanityCheckCachedType uses the exact same condition (now factored into a helper
function) as createType() to determine whether a type is sized or not.
rdar://143833326