Small performance improvement for ShortcutManager.register()

In order to find existing shortcuts with the same keymap, The
ShortcutManager class queries each existing shortcut in its database
for its keymap. Since there can be only one active shortcut with the
given keymap, it's enough to keep a dictionary from keymaps to shortcuts
to avoid this lookup.

Note that the ShortcutManager class needs further work. This design
choice does not match the way its used from ShortcutManagerDlg for
instance.