Emit code for storing global constants

Still TODO:
- GC issue with global strings
- Store global functions
- References to globals
- Probably more?