Flush the undo history to disk regardless of whether the user saves on exit.