Ensure we don't attempt to compile obsolete methods.

We would run into issues if we tried to compile an obsolete method
since some of the information needed to do so is lost as we redefine
the declaring class. Since compiling these methods is unlikely to have
a major effect on the performance of the program we simply tell the
JIT not to bother with them.

Also update all places to use the new SetDontCompile helper.

Test: mma -j40 test-art-host
Test: stress --cpu 60 &; \
    while ./test/run-test --host --jit --gcstress --64 942; do ; done

Change-Id: Ie70fee6f503818e7589571facf28ccc5e7ca79f8
diff --git a/runtime/openjdkjvmti/ti_redefine.cc b/runtime/openjdkjvmti/ti_redefine.cc
index 4b8108a..6da63aa 100644
--- a/runtime/openjdkjvmti/ti_redefine.cc
+++ b/runtime/openjdkjvmti/ti_redefine.cc
@@ -121,6 +121,7 @@
         new_obsolete_method->CopyFrom(old_method, ptr_size);
         DCHECK_EQ(new_obsolete_method->GetDeclaringClass(), old_method->GetDeclaringClass());
         new_obsolete_method->SetIsObsolete();
+        new_obsolete_method->SetDontCompile();
         obsolete_maps_->insert({old_method, new_obsolete_method});
         // Update JIT Data structures to point to the new method.
         art::jit::Jit* jit = art::Runtime::Current()->GetJit();