Faster `ArtMethod` fixup in `ImageWriter`.

Calculate the access flags in a local variable to avoid
unnecessary atomic operations. Clean up the code to avoid
some unnecessary branching. Avoid nterp flag recalculation
when the target ISA is the same as `kRuntimeISA`.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Bug: 181943478
Change-Id: I2486d54f4b4cf73f9b8e94b366ee9db3085e5fa7
4 files changed