Use __defineGetter__ instead of setting a
console property on self because cefode
already defines a console via __defineGetter__
and we need to override it.
This allows jQuery to be successfully loaded from a web worker
since it does not have a document or window object by default.
Previously it would log about missing methods and properties.
Closes#228
Config adds to the require paths so it needs to be required
before the handler starts so that web worker handlers have the
same require semantics as the main window.
This commit makes all interactions between Task and Worker look
like method calls. The worker now has a global `callTaskMethod`
function that it can use to call methods on the Task object. And the
Task can use `callWorkerMethod` to call methods on a global `handler`
object in the worker. The worker's initial `handler` actually contains
the `start` method, which the Task initially calls to kick things off.
Then the global `handler` gets replaced with whatever `handlerPath`
is specified by the Task. The worker then calls `workerStarted` on its
parent Task object.
This commit also gets rid of the `onProgress` method with the reply
semantics, favoring a more explicit interaction. When `snippetsLoaded`
finishes adding the snippet data, we call `loadNextPackageSnippets`
explicitly rather than returning a reply message.