Fix changing options with gpgconf.
* src/engine-gpgconf.c (gpgconf_write): Connect a pipe to the child's stderr, and wait for it to be closed as an indication that gpgconf has exited. Also improve error handling.
- GnuPG-bug-id: T2881
- Signed-off-by: Justus Winter <justus@g10code.com>