Change ThreadGroup to no longer hold strong references to threads.

This is intended to fix an issue where threads were leaking when
they weren't started.

This changes a lot of the internals of ThreadGroup, taking advantage
of a new utility method dereferenceIterable that turns a collection
of references into the corresponding iterable of referents.

Change-Id: I8d96c79b4ee30c557276854b38149b9131b656ee
http://b/1937448
4 files changed