Explicitly added window. infront of all calls to local methods in ace/worker/worker.

The reason is that if it's ever loaded in somewhere else, we want it to use the methods defined within the closure. Makes it possible to test it
Added test-cases for the define()-method for web-workers. Current 1/2 fails, as AMD-modules are not supported.
Added support for AMD-modules by actually loading in any modules mentioned in the dependency-parameter.