client: Pull fcntl locking into a helper function
client: Pull fcntl locking into a helper function

- Split acquire_lock() into the lockfile-specific part and a generic
helper function to do fcntl() locking

cmusatyalab/openisr,cmusatyalab/openisr,cmusatyalab/openisr,cmusatyalab/openisr,cmusatyalab/openisr