pam: Fix issue with changed password not unlocking keyring

This is a backport of fix on master with the same subject. There's
a bit of strange code in the are of this fix, but lets keep it as
minimal as possible.

If a user (needs to) change their password while authenticating (via
GDM for example), and pam_gnome_keyring is configured to start the
daemon from the session PAM stage, then we were failing to pass the
changed password to our session handler.

Fix this issue so that this workflow works.

https://bugzilla.gnome.org/show_bug.cgi?id=726196