If a task throws an error, reject the promise.

Also add tests for TaskProcessor, and add a helper function to do Jasmine-style "waitsFor" on a promise, then assert on the result or error.
Store the default TaskProcessor workerModulePrefix as well to make it easier to reset after tests.
Merge pull request #1005 from AnalyticalGraphicsInc/reportTaskProcessorFailure

Add error handling to TaskProcessor