riscv64: Enable JNI compiler.

Implement the required `WriteCIE()`, fix a bug in the
`art_jni_dlsym_lookup_critical_stub`, fix reference loads
to be zero-extended and enable the JNI compiler for riscv64.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: run-gtests.sh
Test: testrunner.py --target --64 --ndebug --prebuild --no-prebuild -t 178
Test: # Edit `run-test` to disable checker, then
      testrunner.py --target --64 --ndebug --cdex-none --optimizing
      # 7 tests fail (pre-existing failures): 004-StackWalk, 137-cfi,
      # 2042-reference-processing, 597-deopt-busy-loop, 629-vdex-speed,
      # 638-checker-inline-cache-intrinsic and 661-oat-writer-layout.
Test: aosp_cf_riscv64_phone-userdebug boots without crashes.
Bug: 283082089
Change-Id: Ifd47098b7428919b601dd22a130ad1bd51ae516d
9 files changed