Refactor spaces and add free list large object space

Added some more abstraction for spaces, we now have ContinuousSpaces and DiscontinousSpaces.

Added a free list version of large object space.

Performance should be better than the memory map version since we avoid creating more than
one memory map.

Added a cause for Gc which prints with the Gc message, dalvik has this as well.

Change-Id: Ie4aa6b204fbde7193e8305eb246158fae0444cc1
diff --git a/src/card_table.cc b/src/card_table.cc
index 5bfdfaf..8d0ddd1 100644
--- a/src/card_table.cc
+++ b/src/card_table.cc
@@ -88,7 +88,7 @@
   ANNOTATE_BENIGN_RACE_SIZED(begin, (end - begin), "writes to GC card table");
 }
 
-void CardTable::ClearSpaceCards(Space* space) {
+void CardTable::ClearSpaceCards(ContinuousSpace* space) {
   // TODO: clear just the range of the table that has been modified
   byte* card_start = CardFromAddr(space->Begin());
   byte* card_end = CardFromAddr(space->End()); // Make sure to round up.
@@ -100,7 +100,7 @@
   memset(mem_map_->Begin(), GC_CARD_CLEAN, mem_map_->Size());
 }
 
-void CardTable::PreClearCards(Space* space, std::vector<byte*>& out_cards) {
+void CardTable::PreClearCards(ContinuousSpace* space, std::vector<byte*>& out_cards) {
   byte* card_end = CardFromAddr(space->End());
   for (byte* card_cur = CardFromAddr(space->Begin()); card_cur < card_end; ++card_cur) {
     if (*card_cur == GC_CARD_DIRTY) {
@@ -110,7 +110,7 @@
   }
 }
 
-void CardTable::GetDirtyCards(Space* space, std::vector<byte*>& out_cards) const {
+void CardTable::GetDirtyCards(ContinuousSpace* space, std::vector<byte*>& out_cards) const {
   byte* card_end = CardFromAddr(space->End());
   for (byte* card_cur = CardFromAddr(space->Begin());card_cur < card_end; ++card_cur) {
     if (*card_cur == GC_CARD_DIRTY) {