Fix problems with propagating errors from workers to the main thread.

* Errors can not be posted directly.  Copy their properties into a plain object for transport.
* If postMessage fails, use formatError to provide a better string error message.
Merge pull request #1648 from AnalyticalGraphicsInc/formatWorkerError

Fix problems with propagating errors from workers to the main thread.