Add autoconf checks for getpwnam_r and getgrnam_r.

Right now, only the checks are included.  The functions aren't
used at all.
Use getpwnam_r() and getgrnam_r() if available.  Closes #775.

If the user is building threaded on a system without those functions,
too bad.  It's 2014, and every sane system has those functions
Add and expose fr_getgid().  Addresses #776

The current users of getgwnam() don't need the entire group
structure.  They just need the gid.  So we create a function
which returns that.
Use new fr_getgid() function.  Addresses #776
Use ralloc'd memory for getgrnam_r().  Closes #776
Fix use of talloc buffers
Allow SQL to add clients to virtual servers
Added checks for libpcre