this patch adds support for accumulation mode undo for transformations.
this is a big speed improvement when you are working with a large scene.
i'm guessing the reason that it hasn't been implemented this way is that there are some edge cases where inverting the transformation won't work (maybe when using constraint modifiers or armatures?).
if there are some edge cases where it doesn't work, transform_undosys_invert() could detect those cases and return false, which makes it fall back to the global undo system.
I also updated the logic in undo_system for undo/redo, because it wasn't working with this code.
related issue: https://developer.blender.org/T60418