Implement chord_stack (#2241)
Implement chord_stack (#2241)

This commit implements a chord stack to keep track of the chord modes
that were activated. When exiting a mode, a higher-level chord with
the mode attribute is searched for. If found, it is activated.
Otherwise the root keybindings are restored.
A new command is introduced: cmd_ungrab_all_chords.
Unlike before, cmd_ungrab_chord does not directly go to the root mode.
This can now be explicitly done with cmd_ungrab_all_chords.

Rationale:
+ emacs-like shortcut sequences have been requested: #1208, #470
+ they are available since #1777 (mid-2020), but probably a niche
  application. Let's see how this develops.
+ people who wanted this feature (including me) probably gave up and
  maybe switched to another WM with this functionality,
  [e.g. this comment](https://github.com/qtile/qtile/issues/1208#issuecomment-455323244).
+ The functionality this PR provides cannot be achieved with user extensions,
  as stated in #2241. The hooks are not called in the right places to create a
  work-around.
+ The pr was developed and tested extensively with [my config](https://github.com/ep12/qtileconf)
  (especially `xournal_bindings.py`). I was able to do everything I wanted.
  Before that I filtered the actions by program, see #1661. With the `xournal`
  chord/mode I don't need all that complicated stuff.
+ Combining normal key bindings with custom modes is really quite ideal: the
  important stuff can be controlled with one keystroke, special stuff is in a
  separate mode.
+ The performance impact of this feature enhancement is ~0.
+ The config breakage impact of this feature is minimal: having
  `lazy.ungrab_chord()` bound to a key inside two nested `KeyChord`s with
  `mode` set behaves now differently; a suitable replacement
  (`lazy.ungrab_all_chords()`) is provided.

Furthermore, the current_chord variable is removed as it is not
necessary anymore.

The linter complained about an else block after a for without a break.
This superfluous else was removed.

ramnes/qtile,qtile/qtile,qtile/qtile,ramnes/qtile