It seems x-resource-name gets set directly in elisp before it ever has a chance
to get set via the C code so set it here to "emacs" as well to ensure it is
named as we prefer. Fixes alexmurray/emacs-snap#83.
It seems gdk uses g_get_prgname() when initially setting X WM properties during
gtk_init() so try and force this to the value we want before calling gtk_init()
Vinvocation_name is used by too many things and causes other issues like
issue #84 so instead leave this but instead default Vx_resource_name to "emacs"
to fix the X WM_CLASS as emacs but allow it to still be set by -name as usual.
This ensures that gtk sets the WM_CLASS to Emacs not Emacs-gtk or similar since
it also uses the value of argv[0] when choosing this. Should completely resolve
issue #83.