Port t_pipe2.c to FreeBSD

- Omit the pipe2_nosigpipe testcase on FreeBSD (FreeBSD doesn't have
  O_NOSIGPIPE).
- Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)".
- Save and restore the resource limit on the number of files (RLIMIT_NOFILE).

In collaboration with: pho
Sponsored by: EMC / Isilon Storage Division


git-svn-id: svn+ssh://svn.freebsd.org/base/head@273520 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f