Lock the spawning of a new UI server.
* src/exechelp.c (gpgex_lock_spawning): New. (gpgex_unlock_spawning): New. * src/client.cc (uiserver_connect): Use the new lock functions.
The locking is required to be sure that only one UI server is started.
The lock code has been taken from GnuPG (common/asshelp.c) of which
g10 Code is the sole author.