Fix string race conditions in WebSharedWorkerImpl

In C++, temporary variables are allowed to live as long as the statement
they're created in is running. If you call callOnMainThread in the same
statement as String::isolatedCopy, the string might be used on the main
thread before the temporary returned by isolatedCopy is destroyed.

R=jochen@chromium.org
BUG=223955

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167540 bbb929c8-8fbe-4397-9dbb-9b2b20218538