Make wait & stop methods work on all threads

Previously, ThreadGroup.wait and ThreadGroup.stop would iterate over
the self.threads list and call the wait or stop method on each one.
This list could potentially be edited concurrently by the _thread_done
callbacks and remove some items in the list.  As a result, the wait
method would not actually wait for all threads in the thread group.

Change-Id: Iad5d3e47c8235eadd52a8193657aebb92158568b
Closes-Bug: #1196525
Merge "Make wait & stop methods work on all threads"