HPCC-8732 Core on second embedded javascript query in Roxie

Interaction with threadpools caused some issues if a second javascript call
was made on a thread that was a member of a threadpool.

Other embed plugins were also affected by a slightly different bug, which
would cause a stack fault on the second call.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>