Threading WASM. Setting the backend.

I have made pull request, which may fix this issue. -sPTHREAD_POOL_SIZE_STRICT is apparently not working. Maximum number of threads is still equal to hardware concurrency. What worked was to use EM_ASM_INT. It relies on the fact that no other threads are spawned. https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11749/diffs

Correction, it may work. Only tested in a small C program to see I for sure got the number of threads in my pool.

Damn it. It returns 0, when executed in VTK. I have small ES6 module, when it returns 4 if I set the -sPTHREAD_POOL_SIZE=4.

It occurs since the module is not initialized at this point. Perhaps, I could expose a method for setting the maximum number of threads, like we had in the good old days.

If so, could you point me in the direction of how. Should I make it on the general thread pool and ignore it if the backend is different from STDThread? @jaswantp