Cache the value of MterpShouldSwitchInterpreters()

Add field to the Thread object which stores the value instead (negated).
Explicitly update the field when relevant state changes (which is rare).

This speeds up golem interpreter benchmarks by 3.5%
on average with some benchmarks up to 15% faster.

Test: test.py -b -r --interpreter --host
Change-Id: If2df0d3bf9e69ab50c30102b2648e997927c34d8
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index 2ae95dc..8a31985 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -321,7 +321,7 @@
       } else {
         while (true) {
           // Mterp does not support all instrumentation/debugging.
-          if (MterpShouldSwitchInterpreters() != 0) {
+          if (!self->UseMterp()) {
             return ExecuteSwitchImpl<false, false>(self, accessor, shadow_frame, result_register,
                                                    false);
           }