Fix transaction records for `fill-array-data`.

We need to record old array elements, not the new ones, so
call `RecordArrayElementsInTransaction()` earlier. Move the
implementation where it's actually needed, check for NPE
(due to the reordering) and avoid unnecessary read barriers.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --interp-ac
Change-Id: I6282afed941b1a32468aceb970c3e72283b445ba
5 files changed