riscv64: [codegen] Add VisitNullCheck

Also enable codegen for NullCheck and fix related entrypoint
issues. For now, this is using explicit null checks.

Change the default value of the implicit null checks flag in
the `CompilerOptions`. In `dex2oat` we expect the default
value to be false and override it to true when needed by the
selected architecture. This aligns with the behaviour in
`Runtime` which is the source of this information for JIT.
We do not change the default value for implicit stack
overflow checks flag yet because it requires additional
adjustments to avoid breaking certain gtests.

Test: m test-art-host-gtest
Test: aosp_cf_riscv64_phone-userdebug boots.
Test: run-gtests.sh
      # Ignore pre-existing timeout in `TestImageLayout`.
Test: testrunner.py --target --64 --optimizing
      # Ignore 49 pre-existing failures.
Bug: 283082089
Change-Id: If663d3279da5e6c53669860cefa7185c53e7e146
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 74d081d..a5b3ae1 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -42,6 +42,7 @@
 
 namespace linker {
 class Arm64RelativePatcherTest;
+class Thumb2RelativePatcherTest;
 }  // namespace linker
 
 class ArtMethod;
@@ -502,6 +503,7 @@
   friend class jit::JitCompiler;
   friend class verifier::VerifierDepsTest;
   friend class linker::Arm64RelativePatcherTest;
+  friend class linker::Thumb2RelativePatcherTest;
 
   template <class Base>
   friend bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string* error_msg);