fix shared gid support in getpwnam/getgrnam

Bug: 18374693
Change-Id: I5353403cbbead6f6abac87bee2cf53a60dba408c
Merge "fix shared gid support in getpwnam/getgrnam"