undo: Take and keep track of the buffers an UndoSequence references
We're using weakrefs here because I'm paranoid about the lifecycle issues with GTK+ + Python refcounting fun. Starting a group now means dereferencing and re-referencing these buffers, which isn't great, but is probably the least-bad option. The other choice here would be to give groups a reference to their parent UndoSequence, and have the buffers lookup follow that, which seems... more complicated and confusing.
Showing with 12 additions and 4 deletions