Add reference support to typegen

This becomes a C++ reference and an LLVM pointer. This is mostly to deal
with references to World

Closes #13