Make the KeyCache actually work as cache
KeyCache destroys itself whenever the last reference to it is released. Since reinitialization of the cache is very expensive if one has a lot of keys in the key ring, keep a reference on KeyCache for the whole lifetime of the kernel. This will greatly speed up selection of keys, e.g. when composing an encrypted message or when configuring the keys in the identity dialog. Also set up automatic update of the key cache on changes in the key ring by watching the GnuPG home directory (as Kleopatra does).
Showing with 33 additions and 0 deletions