Skip dirtying gc card for ArraySet instructions when value is null

Tip of tree without this CL, we do a runtime null check during
type checking for ArraySet instructions. We can reuse that null
check to skip dirtying the GC card for values which are not
guaranteed to be null at compile time, but are null at runtime.

Bug: 260843353
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Test: m test-art-host-gtest
Change-Id: I38b36a4899e603ae8fce74eb853aaad4b32b3cc4
5 files changed