pam_access: rework resolving of tokens as hostname.

Source: Fedora 40: pam 2024-45478608e2 Security Advisory Updates