WrAP: Hardware and Software Support for Atomic Persistence in Storage Class Memory