rework undotransaction api in order to reduce manual memory management

git-svn-id: file:///svn/Scribus/trunk/Scribus@19416 11d20701-8431-0410-a711-e3c959e3b870