gpg,sm: Implement keybox compression run and release lock in gpgsm
* g10/keydb.c (keydb_add_resource): Call keybox_compress. * sm/keydb.c (keydb_add_resource): Release the lock after a compress.
Note that in gpgsm we already did the compress run but we didn't
released the lock on the file. This might have been a reason for some
strange hangs.
- GnuPG-bug-id: T4644
- Signed-off-by: Werner Koch <wk@gnupg.org>