Currently text fields where you enter numbers or names don't support undo and redo. This patch adds a relatively simple local undo / redo system for button text editing.
Since text field lengths are relatively short and the data short-lived, it makes sense to just store the entire text field for every undo step. But each undo step is a separate alloc to lower to total memory requirement for most quick interactions with text boxes.