Introduce WriteContext with is used reversing actions done during a
failed transaction. Use WriteContext when invalidating caches. Fix bug
using WriteContext, when a successful write replaces a write from
previous failed write.