Fix removeDB deadlock

removeP releases RDLCK and yields if it cannot acquire WRLCK
lockDB attempts the lock a fixed number of times before returning.
addP calls fcntl directly using F_SETLKW instead of calling lockDB