Add tests to check conversion of types to static contracts.
Make numeric contracts in unions better.
Optimize away recursive contracts in more cases.
Optimize cons/sc contracts.