mark types that are directly referenced by non-extern code with @:reallyUsed (see #3050)
[js/python] don't generate require/import for types that are not directly referenced by non-extern code (closes #3050)