Transaction: add RAII-based undo/redo class
add bool Document::transactionRunning() const
use RAII approach to handle undo/redo grouping