Implement undo / redo.
Also reorganize the Settings screen with new options for enabling /
disabling undo / redo and controlling maximum number of undo entries
(for devices with low memory).