Improve coverage on compat_*threads and workqueue
See my branch `thread_coverage`. It solves some but not all of legacy/trac#16798
issue