Make KisShortcutMatcher be more tolerant to recursive entering
Some tools, e.g. text tool, may open a dialog right inside
beginPrimaryAction() callback. It may make KisShortcutMatcher crazy,
because all the modal dialogs have hey own event loop, therefore
the state machine of the shortcuts matcher will be broken.
This patch makes the matcher a bit more tolerant to such faults. It
just manually checks if it is entered more that once, and resets the
action in case a recursion is detected.
BUG:409968
CCBUG:408826,409275