gs-worker-thread: Implement work queue to run them sequentially
Some plugins can iterate the worker's thread main context while running a job, which can lead to nested jobs. The queue makes sure the jobs are run sequentially, while the more prioritized jobs can still be executed sooner than the others.