(#17811) Add test for group name to gid conversion

On OS X, the primary group for a user must be specified as a numeric id and not
a string. There was code to ensure this happens, but it was guarded by a faulty
logic statement and there was no test to catch the bug.
(#17811) Ensure PrimaryGroupID is converted to Int

On OS X, the PrimaryGroupID for a user must be an integer. Ensure this happens
by running `:gid` attributes through `Puppet::Util.gid`.
Merge pull request #1600 from Sharpie/17811-os-x-fix-gid-conversion

(#17811) Fix group id conversion for OS X users