Fixing inefficiency in typeclass resolution.

Instead of keeping checking that evars are pending, we cache the pending
evars in a proper set computed once and for all.