Rework common_periodicChecks.

The function was rewritten to optimize the common path.  The control flow
now matches the C version, which tests for debugger/profiler even if the
previous test for suspension came up true.

This also adds a minor optimization on the test for debugger attachment,
allowing us to skip a load from memory if the process is simply not
debuggable.  (The optimization isn't yet enabled because a similar change
must be made to the x86 asm code.)

The VM apparently hadn't been built without debugging/profiling support
for a while, so this fixes those places (necessary to be able to test
all forms of the new code).

Bug 2634642.

Change-Id: I096b58c961bb73ee0d128ba776d68dbf29bba924
diff --git a/vm/interp/InterpDefs.h b/vm/interp/InterpDefs.h
index 826c6d2..ac667cd 100644
--- a/vm/interp/InterpDefs.h
+++ b/vm/interp/InterpDefs.h
@@ -124,12 +124,16 @@
      * These are available globally, from gDvm, or from another glue field
      * (self/method).  They're copied in here for speed.
      */
+    /* copy of self->interpStackEnd */
     const u1*       interpStackEnd;
+    /* points at self->suspendCount */
     volatile int*   pSelfSuspendCount;
 #if defined(WITH_DEBUGGER)
+    /* points at gDvm.debuggerActive, or NULL if debugger not enabled */
     volatile u1*    pDebuggerActive;
 #endif
 #if defined(WITH_PROFILER)
+    /* points at gDvm.activeProfilers */
     volatile int*   pActiveProfilers;
 #endif
     /* ----------------------------------------------------------------------