common: New helper function gnupg_chuid.
* common/sysutils.c (try_set_envvar): New. (gnupg_chuid): New.