Create the socket directory before initializing the key cache
This way we avoid a race between gpg and gpgsm both trying to create the
socket directory and then using a wrong socket directory when the mkdir
fails for one of them.
- GnuPG-bug-id: T7332