Wait for GC to finish in ThreadList::~ThreadList

Added a DisableGC to the heap instead of using the runtime shutdown
boolean. The runtime shutting down boolean is set to true before the
non daemon threads have exited. These threads may still be doing
allocations and we don't want to throw OOME if unnecessary.

Bug: 18577101
Change-Id: Iceb7048e6bd799aa2716099459c54f8dc0fb8feb
3 files changed