[new-generics] Prune generic-escape search at external nominal types
[new-generics] Prune generic-escape search at external nominal types

Summary:
This diff makes up for the performance regression introduced in D21702072 by avoiding exploring imported `InstanceT`s, except in their type arguments. This should be safe, at least under types-first, because I don't think there's a way to embed a local generic inside an external class instance in a way that the generic is accessible in the local module, other than by instantiating the external class's type parameters with the local generic.'

There is an error diff, which suggests that this isn't the case! However, the missing errors seem to be duplicates of other remaining errors but with different errors (and seem to be pointing at generic-typed properties).

Reviewed By: samwgoldman

Differential Revision: D22461188

fbshipit-source-id: 3b66918a19254f6605e30a7135b98afb7db429ed

nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow