[FIXED COM4J-70]

Comment from martin-a was right.

The original code for the execute(Task) was more or less correct, in that it minimizes the lock to update ComThread state, then hold on to the task lock that covers both the list insertion (since the ComThread can start picking it up as soon as the task is inserted to the queue.)

So the correct fix I think is to reduce the lock that ComThread holds on to for updating internal state. This change does that by introducing a separate pop operation.