core: Check environment variables before giving to GAppLaunchContext
Depending on the type of session, one or the other might be NULL, which is not meant to be handled by these functions. Check for both DISPLAY envvars before setting them on the GAppLaunchContext.
Closes: #586 (closed)