Add missing Barriers in ReplaceReferences

While replacing references we would incorrectly fail to mark objects
if their references are accessed through the 'VisitRoot' visitor
function. This occurs with DexCache and ClassLoader objects, hitting
the caches and the class table respectively. This could cause problems
if a root was replaced and the reference was not replaced in any of
the other paths. In this case the objects page would not get marked
and the GC would (correctly) throw an error saying it missed a write.

Test: ./tools/parallel_run.py -j80
Test: ./art/test/run-test --host 2001
Bug: 134162467
Change-Id: I9a1ad15fd3986e92dfc39c6f87cebdb031492aab
1 file changed