Add getgrnam_r for porting CRuby

add getgrnam_r symbol
Add getpwnam_r to portin CRuby

getpwnam_r and getpwuid_r is almost same function.
So, implement getpw_r for commonly function and
To change the two function to call getpw_r
Add function of pgid for porting CRuby