Fix ReferenceQueue code (and some test)

ReferenceQueue from OpenJdk needs some more alterations
to work with OpenJdk-but-heavily-modified-to-work-with-our-GC
Reference class.

Updated ReferenceTest#test_subclass test to expect
seems to expect #clear followed by #enqueue, but android
code doesn't call any of them. I need to find someone
knowledgeable to figure out what's the expected behavior).

Change-Id: I86f9a9682d781136fb3d97023ee9de39d2a2ac1a
2 files changed