common: New function gnupg_socketdir.