liblock: add missing includes to common object

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
libtool: steal a much better makefile from tools/lib/traceevent/

No need to reinvent the wheel here.

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