Refactor some GC code.

Reduced amount of code in mark sweep / semi space by moving
common logic to garbage_collector.cc. Cleaned up mod union tables
and deleted an unused implementation.

Change-Id: I4bcc6ba41afd96d230cfbaf4d6636f37c52e37ea
diff --git a/runtime/gc/collector/semi_space.h b/runtime/gc/collector/semi_space.h
index 52b53aa..f067cb2 100644
--- a/runtime/gc/collector/semi_space.h
+++ b/runtime/gc/collector/semi_space.h
@@ -28,37 +28,28 @@
 
 namespace art {
 
+class Thread;
+
 namespace mirror {
   class Class;
   class Object;
-  template<class T> class ObjectArray;
 }  // namespace mirror
 
-class StackVisitor;
-class Thread;
-
 namespace gc {
 
+class Heap;
+
 namespace accounting {
   template <typename T> class AtomicStack;
-  class MarkIfReachesAllocspaceVisitor;
-  class ModUnionClearCardVisitor;
-  class ModUnionVisitor;
-  class ModUnionTableBitmap;
-  class MarkStackChunk;
   typedef AtomicStack<mirror::Object*> ObjectStack;
   class SpaceBitmap;
 }  // namespace accounting
 
 namespace space {
-  class BumpPointerSpace;
   class ContinuousMemMapAllocSpace;
   class ContinuousSpace;
-  class MallocSpace;
 }  // namespace space
 
-class Heap;
-
 namespace collector {
 
 class SemiSpace : public GarbageCollector {
@@ -189,12 +180,6 @@
   void ProcessMarkStack()
       EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
 
-  void ProcessReferences(mirror::Object** soft_references, bool clear_soft_references,
-                         mirror::Object** weak_references,
-                         mirror::Object** finalizer_references,
-                         mirror::Object** phantom_references)
-      EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
-
   inline mirror::Object* GetForwardingAddressInFromSpace(mirror::Object* obj) const;
 
   // Revoke all the thread-local buffers.