Reland "Compilation type and state allocate an unnecessary Smi on v8::Script" (r15940).

It turns out that this change is not related to the test failures.

TBR=danno@chromium.org

Review URL: https://codereview.chromium.org/21256003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15962 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Pipe a script's CORS status through V8 during compilation.

In order to properly sanitize exception data during a 'window.onerror'
handler, we need to know whether a script was served with proper CORS
headers at the time it was loaded into V8. This patch adds a single bool
to ScriptOrigin, and pipes that through the compiler to land on the
Script object. We can then retrieve the parameter when calling the
embedder's exception callback.

BUG=crbug.com/159566
R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/20646006

Patch from Mike West <mkwst@chromium.org>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15963 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Simplify implementation of Mutex.

Also moves Mutex to its own file mutex.{cc,h}.

R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/21087012

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00