[th/prgname] use atomic pointers for g_prgname/g_application_name and add g_set_prgname_once()
No need for a GMutex for accessing the pointers g_prgname/g_application_name.
Also, some internal code (g_option_context_parse()/g_application_run()) will initialize g_set_prgname(), if it's not set yet. That check was racy and fix it by adding g_set_prgname_once().
Optimally, g_set_prgname_once() would be internal only, but then it could be used by g_application_run(). Hence it's public API.