Fix stale remembered sets error.

We were forgetting to remove the remembered set in transition to
background. This resulted in remembered sets being added for
spaces which no longer existed. This finally caused an error when
a new space happened to have the same address as the old space,
resulting in a CHECK failure.

Also tuned the number of ParallelGC to prevent spurrious failures
and removed the ParallelGC from broken tests in the make file.

Bug: 16532086
Bug: 16406852

Change-Id: I00bbcbd7daa03c867732d165be62b72e6c43bce1

(cherry picked from c5a8347ac491a5f521945d3835a322123830456b)
diff --git a/runtime/gc/ b/runtime/gc/
index 4d842f1..9548022 100644
--- a/runtime/gc/
+++ b/runtime/gc/
@@ -1609,6 +1609,10 @@
         // Remove the main space so that we don't try to trim it, this doens't work for debug
         // builds since RosAlloc attempts to read the magic number from a protected page.
+        RemoveRememberedSet(main_space_);
+        RemoveRememberedSet(main_space_backup_.get());
+        main_space_backup_.reset(nullptr);
+        main_space_ = nullptr;
         temp_space_ = space::BumpPointerSpace::CreateFromMemMap("Bump pointer space 2",
diff --git a/test/ParallelGC/ b/test/ParallelGC/
index eb9e04e..fd95c6c 100644
--- a/test/ParallelGC/
+++ b/test/ParallelGC/
@@ -39,7 +39,7 @@
     public void run() {
         List l = new ArrayList();
-        for (int i = 0; i < 1000; i++) {
+        for (int i = 0; i < 400; i++) {
             l.add(new ArrayList(i));