Fix RecordFree to take signed parameters.

RecordFree can get negative bytes allocated when background
compaction foreground transitions occur. This caused a DCHECK to
fail on debug builds. Also did some refactoring in
PreProcessReferences.

Bug: 13568814
Change-Id: I57543f1c78544a94f1d241459698b736dba8cfa8
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index eb53ba9..3dfd065 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -353,7 +353,7 @@
 
   // Freed bytes can be negative in cases where we copy objects from a compacted space to a
   // free-list backed space.
-  void RecordFree(size_t freed_objects, size_t freed_bytes);
+  void RecordFree(ssize_t freed_objects, ssize_t freed_bytes);
 
   // Must be called if a field of an Object in the heap changes, and before any GC safe-point.
   // The call is not needed if NULL is stored in the field.