Clean up refcounting.
- Simplify logic.
- Add comments.
- For now, make generated code for refcounting a lot simpler.
Begin refactoring IR generation.
- Make some wrapper classes in irval.h and start moving logic over.
- Rewrite type construction.