liblock: wrap kernel/lockdep.c to allow usage from userspace

kernel/lockdep.c deals with validating locking scenarios for various
architectures supported by the kernel. There isn't anything kernel
specific going on in lockdep, and when we compare userspace to other
architectures that don't have to deal with irqs such as s390, they
become all too similar.

We wrap kernel/lockdep.c and include/linux/lockdep.h with several
headers which allow us to build and use lockdep from userspace. We don't
touch the kernel code itself which means that any work done on lockdep
in the kernel will automatically benefit userspace lockdep as well!

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: public headers for mutex implementation

These headers provide the same API as their pthread mutex counterparts.

The design here is to allow to easily switch to liblock lock validation
just by adding a "liblock_" to pthread_mutex_*() calls, which means that
it's easy to integrate liblock into existing codebases.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: mutex test suite

This is a rather simple and basic test suite to test common locking
issues.

Beyond tests, it also shows how to use the library.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: public headers for rwlock implementation

Both pthreads and lockdep support dealing with rwlocks, so here's the
liblock implementation for those.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: rwlock test suite

A simple test to make sure we handle rwlocks correctly.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>