Avoid creating a thread if remaining jobs can be placed in the same array as thread handles.

If we have to wait for, e.g. 65 jobs, first we create a thread which waits for first 63.
The remaining two can be waited on by the same WFMO call which waits for thread
completion. This will avoid creating 2 threads in this case.