JS: fix thread-related primops

Closed Sylvain Henry requested to merge hsyl20/ghc:hsyl20/js-listthreads into master

Fix thread-related primops for the JS backend. Found while debugging !10130 (closed)

Merge request reports