Attempt to move all UID/GID getting away from the slurmd/slurmstepd.

This is needed primarily for native Cray systems to avoid hitting their
LDAP or NIS server from every node in their system.  This can also provide
a more scalable model for other systems as well.
Add new condition to test
Fix issue if freq is set to 1
CRAY - added missing header