Implemented AtomicXXX and YYYReferences in javalib, including tests