When combining patterns, optimize A(C,C) to C.  Now it's 1.4 times faster.
Slight optimization and refactoring.  It's about 1.09 times faster.

Moved type_subst from basic.c to type_sym.c where it's all localized.

Made the V function non-static so I could call it directly in a few places to
preset value types, which speeds a few things up marginally.