Avoid holding locks on gewtHandles.

Some of the operations we were doing on worker threads while
iterating over the list of worker threads were fairly deep and
themselves required locks.  Instead, try to hold the lock on
worker thread lists as short as possible.  Snapshot them and
iterate over the snapshot when doing complicated tasks.

Change-Id: I4c257e83b2a2f985bf571f4f64e2db44d2d17e3d