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>
Merge pull request #3928 from richardkchapman/embed-core

HPCC-8732 Core on second embedded javascript query in Roxie

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>