Reorganization of Code Generation

This reorganizes code generation and moves part of it to metaprogramming on load time, which apart from improving load times (at least on my machines) also has the added benefit of allowing us to easily switch to a different organizational structure if dynamic generation of types proves unsuitable for this task (since this package alone has more types than all of Base). Anyway, I tried to make the result as close as possible to the original and will send functional changes in a different pull request.

This also dependes on my previous two pull requests. If those are merged before this, I will rebase this branch as appropriate.

WARNING: I'm currently hunting a memory bug in Julia triggered by this. After that this should be good to merge, but I figured I'd put it up before.