This adds support for a "fair" variant of the lock. When there are
multiple entities within a single process that are blocked waiting
for the lock the fair lock will ensure that they acquire the lock
in FIFO order.
For now at least, when fair locks are in use we don't support
the "semaphores" argument.
If external locks are enabled, the inter-process ordering will be
determined by the underlying OS lock ordering and process scheduling.
Change-Id: I37577becff4978bf643c65fa9bc2d78d342ea35a