Limit the number of concurrent steps/threads with a semaphore.
This tries to work around OSError Errno 11 on thread creation and
fork observed on inputs with 100+ samples.
Removed Popen.wait() calls that were not needed and could deadlock.
Also added a few try-finally pairs to release resources on exceptions
Corrected use of try-finally for semaphores; more try-finally use.
Manifest checking code was suspect for generating errno 11 on large
restart. Hardened resource release on this one.
More try-finally use
Small fix and large comment on QS instance