Move thread suspend check at safepoints.

Move CheckSuspend on backward branch, return and exception handling.

Bug: 10603072
Change-Id: Ic6c2c5066f133a345323d46edca7afde350849d8
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h
index 4d9317f..8cd526a 100644
--- a/runtime/interpreter/interpreter_common.h
+++ b/runtime/interpreter/interpreter_common.h
@@ -510,6 +510,10 @@
   }
 }
 
+static inline bool IsBackwardBranch(int32_t branch_offset) {
+  return branch_offset <= 0;
+}
+
 }  // namespace interpreter
 }  // namespace art