Changes and additions for memory model

- Replaces type tags with actual types, I think it's clearer
- Filled in TODO sections
- Added description for resources
- Added example for by-ref returning
Boolean is usually capitalized when talking about the generic data type, e.g. see: https://en.wikipedia.org/wiki/Boolean_data_type
because it is derived from a personal name. Integer is not derived from any name, so it is lowercase.