Add closures. Extensive refactoring.

Refactor compilation:
- Make all compilers and class loaders throwaway objects. This effectively removes the compiler from the intended public API.
- To combat problems with the aforementioned change, cache all classes.
- All templates and closures share the same base API, unit.
- Split parser and compiler responsibility.

Global variables are now loaded from a separate model, which removes the need to use the createModel function.
Add test for global variables.

Other naming changes were made as well:
- The classes in compiler.parser have been moved to compiler.visitor
- Template classes have been moved to the template package
- Closure blocks are now just called closures, this change is reflected in the packages as well

This is a huge commit (my fault!). Do not expect that this text summarizes every minor change.