Ensure ThreadPool constructor does not return until fully initialized.

Thread pool was being deleted too early during runtime shutdown,
this was causing a GC running during runtime shutdown to
occasionally reference a deleted thread pool.

Fixed an error where the thread pool was being deleted before the
threads were done attaching by making the thread pool constructor
block until all of the threads are attached.

Change-Id: I5f0884a74d78c4541ee0e582112857077f3f594f
diff --git a/src/barrier.cc b/src/barrier.cc
index 9651828..052536a 100644
--- a/src/barrier.cc
+++ b/src/barrier.cc
@@ -4,8 +4,8 @@
 
 namespace art {
 
-Barrier::Barrier()
-    : count_(0),
+Barrier::Barrier(int count)
+    : count_(count),
       lock_("GC barrier lock"),
       condition_("GC barrier condition", lock_) {
 }