Fix 2042-reference-processing synchronization

The phantomRefs HashMap was not consistently lock-protected.
Change it to a ConcurrentHashMap instead and remove the lock.

We conjecture this caused the first bug listed below.
We initially thought this might also fix the second one and
tried to remove the TODO and re-enable that part of the test.
Unfortunately that again resulted in a very intermittent local
failure on host.

Add comments to the CC collector to explain a particularly
surprising use of memory_order_relaxed, which I keep having
to rejustify to myself.

Bug: 285914076
Bug: 216481630
Test: Treehugger
Change-Id: I2e5616c5ad0eab59f4a0e89d451e7e34a94448f3
2 files changed