Fix unused variable warning in runtime/gc/heap.cc.

The variable volatile_sum is used to prevent the compiler from
optimizing away the loads, but it's flagged as an unused variable.
Remove it and instead use an utility function that uses static_cast
to void to emit the load instructions.

Bug: 197240255
Test: presubmit
Change-Id: Ibf0110654a5100ccd0a182b7acfbd81647b2e902
2 files changed