lockfile: move documentation to lockfile.h and lockfile.c