Avoid unnecessary read barriers in `ImageWriter`.

Also avoid visiting native roots during the same stages,
namely layout and writing (including copy-and-fixup).

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: I0d62d67556109dbcbd8a04fd0e8408733dacce33
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 9d2755c..c64c137 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2358,7 +2358,7 @@
   // Cleanup references to single implementation ArtMethods that will be deleted.
   if (cleanup_cha) {
     CHAOnDeleteUpdateClassVisitor visitor(data.allocator);
-    data.class_table->Visit<CHAOnDeleteUpdateClassVisitor, kWithoutReadBarrier>(visitor);
+    data.class_table->Visit<kWithoutReadBarrier>(visitor);
   }
   {
     MutexLock lock(self, critical_native_code_with_clinit_check_lock_);