Clear redo stack when adding undo action

This fixes a bug in Geany where modifying the document does not clear the
redo actions stack.