Make ArtMethod methods const or requiring the mutator lock.

Helps the jitzygote optimization on sharing the boot image methods
post fork.

The CL shows that the code base already almost fully handles requiring
the mutator lock when mutating ArtMethod data.

Bug: 119800099
Test: builds
Change-Id: If4a938b66aac85304ec0a27c53bb9fa951191d8c
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 9c61386..c87d0f7 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -3759,7 +3759,8 @@
 
 // Does anything needed to make sure that the compiler will not generate a direct invoke to this
 // method. Should only be called on non-invokable methods.
-inline void EnsureThrowsInvocationError(ClassLinker* class_linker, ArtMethod* method) {
+inline void EnsureThrowsInvocationError(ClassLinker* class_linker, ArtMethod* method)
+    REQUIRES_SHARED(Locks::mutator_lock_) {
   DCHECK(method != nullptr);
   DCHECK(!method->IsInvokable());
   method->SetEntryPointFromQuickCompiledCodePtrSize(