Allow simulation worker mode

This mode doesn't create any worker and just handles the execution of
the task on the main thread. This allow the use of the class even if the
browser doesn't allow/support workers.