Extract atomic pair code from DexCache

Move it to its own header so the code can be reused.

Test: test.py -b -r --interpreter
Change-Id: I749a03c48df8b481efcf573a41feb67c9b15f393
4 files changed