Don't use fences to implement volatiles

Mixing the fence-based implementation with acquire/release instructions
on ARMv8 is not just ugly but incorrect. A volatile store; volatile
load sequence implemented as a release store followed by ld; dmb
does not prevent reordering.

This should remove the last places we were using fences to implement
volatiles.

The HeapReference representation is changed to be an Atomic,
thereby avoiding many casts. We no longer inherit from ObjectReference,
which was documented to be a value type. HeapReference is not, since
it contains an atomic.

Disentangle HeapReference and ObjectReference/CompressedReference
uses sufficiently to get the code to compile again. They were
previously used somewhat interchangably in a few places, in spite
of the different intended semantics (value-type vs. a concurrently-
updateable field). Further disentanglement might be useful.

Flag a strange fence use I haven't yet understood.

Test: Booted AOSP. Ran default tests. Some object code inspection.

Bug: 31023171

Test: Built AOSP
Change-Id: I7b3c3e624f480994541c8e3a79e585071c122a3d
15 files changed