Improve IsMovableObject logic.

The new logic says the main space is non movable iff neither the
background collector or foreground collector are compacting.
Temporarily fixes performance regressions and stability issues
caused by buggy JNI code.

Also addressed a few review comments from previous CLs.

Change-Id: Id5f91765b5fbdae387b566c0bda3392557218ba1
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 26bbacd..0232b4d 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -545,6 +545,9 @@
   static ALWAYS_INLINE bool AllocatorMayHaveConcurrentGC(AllocatorType allocator_type) {
     return AllocatorHasAllocationStack(allocator_type);
   }
+  static bool IsCompactingGC(CollectorType collector_type) {
+    return collector_type == kCollectorTypeSS || collector_type == kCollectorTypeGSS;
+  }
   bool ShouldAllocLargeObject(mirror::Class* c, size_t byte_count) const;
   ALWAYS_INLINE void CheckConcurrentGC(Thread* self, size_t new_num_bytes_allocated,
                                        mirror::Object* obj);