perf(library/unifier): do not explore branches that will trigger type errors

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
perf(library/unifier): do not explore branches that will trigger type errors