Y: Asynchronous module loader

This is work on an AMD compatible module loader.

https://github.com/amdjs/amdjs-api/wiki/AMD

This allows async module loading, and dependency resolution. See terminal.html in the diff.
Should this be checking against the uncanonicalized id?  I guess it will never happen that canonicalize(X) == "require" for X != "require" (etc), but still...