Switch to using c++ for the compilation process, easier then using C
defines everywhere.

Add simple optimization pass framework.

Add incref/decref merging pass for each basic block.

Slightly faster for some benchmarks.