Convert gdbtypes.c to type-safe registry API