Improve cache performance for subtyping.

The basic idea is to avoid remembering some types in subtype*, which delays catching some cycles briefly, in return for using the subtype cache much more agressively.

Not tested yet, but initial performance results are very promising.

cc: @takikawa @shekari @stamourv