fabric: Clean up mutex abstraction and atomic getter-setters in fi.h

The snippet in configure.ac which checked for intrinsics was
always failing so the atomic gcc intrinsics have never been
compiled. Additionally this set is deprecated as of GCC 4.7
which introduced a new set of intrinsics. Replace them
with test for the new c11 intrinsics + implementation,
tested on gcc 4.9.1.

Replaced the semaphore implementation of a mutex with a plain
old pthread mutex.  semaphore.h is part of posix/libc, just
like pthreads which we require explicitly-- so just use that.

Allow the mutex to be compile-time selected as either a mutex or a spinlock.

Signed-off-by: pmmccorm <patrick.m.mccormick@intel.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Merge pull request #266 from shefty/master

fabric: Clean up mutex abstraction and atomic getter-setters in fi.h