trace.cpp: split memory_access_footer into lock_acquire and footer.  Lock acquire always called before instruction.  Footer generally called before instruction, except for CAS, where we check for success and then call footer in the fallthrough path.