Add a hook per magit-key-mode group

This adds a hook per magit-key-mode group, and executes it before
displaying the key-popup.

Example:
```lisp
(defun my-magit-display-staged-diff ()
  "Expand staging section"
  (with-local-quit
    (magit-jump-to-staged)
    (magit-expand-section)
    (recenter 0)))
(add-hook 'magit-key-mode-popup-committing-hook 'my-magit-display-staged-diff)
```

This is especially useful to replace deleted magit-log-edit-mode-hook: in git-commit-mode buffer it's too late: "git is already running".