Only clean up locks that you create

Locks created before a fork/exec had the potential to be cleaned up
after the fork but before the exec if the forked child died.  Now we
just store the pid of the process when the lock is created and ensure
that it is the same process that cleans up the lock.