xdiff/xprepare: refactor abort cleanups