Clean up queued compilation tasks when quitting.

R=jkummerow@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@15261 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
Use mutex instead of busy wait when installing optimized function.

R=jkummerow@chromium.org
BUG=

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

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