gpg: Fix regression in --refresh-keys
* g10/keyserver.c (keyserver_get): Factor all code out to ... (keyserver_get_chunk): new. Extimate line length. (keyserver_get): Split up requests into chunks.
Note that refreshing all keys still requires way to much memory
because we build an in-memory list of all keys first. It is required
to first get a list of all keys to avoid conflicts while updating the
key store in the process of receiving keys. A better strategy would
be a background process and tracking the last update in the key store.
- GnuPG-bug-id: T1755
- Signed-off-by: Werner Koch <wk@gnupg.org>