[flang] simplify derived type info table format
- Replace class(*) member by a c_ptr member to avoid having to handle polymorphic components in the type info table generation. Polymorphic entity handling will require these very tables to be lowered properly. Note: keep the init as NullPointer/Designators. This is technically invalid Fortran, the init should have c_ptr type. But wrapping this in a C_LOC intrinsic call would make runtime generation and lowering more complex with no real benefits.
- ComponentIterator is crashing when used on the generated derived types in GetScope. This patch makes GetScope more robust, but it is not entirely clear to me why this is only happening with the generated derived types.
- The type of generated character globals was incorrect because Scope::FindType was matching character types with different length. Add a CharacterTypeSpec == operator to fix this.
Differential Revision: https://reviews.llvm.org/D102768