[kshortcuteditor] Undo pending changes on destruction
Currently one has to manually call undo() to discard pending changes when being done with the widget.
This is error-prone because it's easy to forget or cause use-after-free issues when calling undo() on an already deleted editor.
Instead automatically undo() on destruction