Fix non concurrent GC ergonomics.

If we dont have concurrent GC enabled, we need to force GC for alloc
when we hit the maximum allowed footprint so that our heap doesn't
keep growing until it hits the growth limit.

Refactored a bit of stuff.

Change-Id: I8eceac4ef01e969fd286ebde3a735a09d0a6dfc1
diff --git a/runtime/utils.h b/runtime/utils.h
index bd81114..fcbb992 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -289,12 +289,12 @@
 uint64_t ThreadCpuNanoTime();
 
 // Converts the given number of nanoseconds to milliseconds.
-static inline uint64_t NsToMs(uint64_t ns) {
+static constexpr inline uint64_t NsToMs(uint64_t ns) {
   return ns / 1000 / 1000;
 }
 
 // Converts the given number of milliseconds to nanoseconds
-static inline uint64_t MsToNs(uint64_t ns) {
+static constexpr inline uint64_t MsToNs(uint64_t ns) {
   return ns * 1000 * 1000;
 }