GLib: implement GMutex natively on Linux

If we have futex(2) then we can implement GMutex natively and gain a
substantial performance increase (vs. using pthreads).

This also avoids the need to allocate an extra structure in memory when
using GMutex or GCond: we can use the structure directly.

The main reason for the increase in performance is that our
implementation can be made more simple: we don't need to support the
array of options on pthread_mutex_t (which includes the possibility, for
example, of being recursive).

The result is a ~30% improvement in uncontended cases and a much larger
increase (3 to 4 times) in contended cases for a simple testcase.

https://bugzilla.gnome.org/show_bug.cgi?id=731986
GMutex (linux): detect and report some errors

Detect the following two errors:

 - attempting to unlock a mutex that is not locked

 - attempting to clear a mutex that was not initialised or was
   initialised but is still locked

Both of these are fatal errors.  We avoid using g_error() here because
doing so would involve calls back into the GMutex code, and if things
are going off the rails then we want to avoid that.

https://bugzilla.gnome.org/show_bug.cgi?id=731986
GCond (linux): fix g_cond_wait_until() return value on timeout

It should return FALSE on timeout (and only on timeout), and
TRUE otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=731986