PER FREEBSD-SA-14:13  Incorrect error handling in PAM policy parser

This is the original patch submitted to FreeBSD
by as far as I can tell Peter Wemm, and Dag-Erling Smorgrav

Testing: Robert Garrett
libthread_xu: add support for named POSIX semaphores.

 * this implementation uses files as rendezvous and simply map files
   into the process address space. It means one page per semaphore.

 * by default, semaphores are created in /tmp/sem. If the
   LIBTHREAD_SEM_PREFIX environment variable is defined, its value is
   used as prefix.