Constructor for QgsLayoutUndoCommand.
The id argument can be used to specify an id number for the source event - this is used to determine whether QUndoCommand
command compression can apply to the command.