liblock: use version information from makefile

This isn't a fancy version system such as in tools/perf/ or tools/kvm/,
but it's probably not worth the bloat for a simple version.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: use headers from kernel tree

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

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: use simple defines for trivial placeholders

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: switch to pthread locking api

While trying to integrate liblock into different programs for testing it out,
I understood that I've probably made a mistake using the kernel's locking
api instead of the pthread one. My reasons are:

 - This library is for userspace developers writing userspace code, they know
how pthread api works, they don't care how the kernel one does.
 - Using the same api makes it easier to switch to liblock in an existing
project.
 - Deal with errors returned from pthread functions.

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