changes to work better with xdm and systemd

- propagate SIGUSR2 from the login child to the parent (xdm)
- pam_open_session must be after fork for pam_systemd to work
- environment variables must be set before calling pam_open_session
- add PAM_RHOST when REMOTEHOST environment variable defined
  so pam_systemd can see this as a remote login session: it affects
  how power functions are treated
allow SIGUSR2 from child for dynamic displays