remove reference to unused utility code
use an actual set() for Scope.types_imported instead of a set-ishly used dict
use arbitrary but predictable C code order when cleaning up imported extension types