Switch to threadsafe builds of SpiderMonkey.

In order to support this, JSAutoRequest is instantiated where necessary, and
the script task is spawned on a native task.

Threadsafe builds have assertions to ensure that we don't call into a
JSRuntime from the wrong OS thread, and are the only supported configuration
in recent SpiderMonkey versions.