* Removed unneeded braces in the condition to check if we want to close
the lock file.
* made the counter for the remaining fds an unsigned int. That is what
get_max_fd_limit() returns, so there are no concerns for an overflow.
Also it cannot go below 0 any more.
* moved the initialisation of the remaining_fds a bit down and added a comment
* Once again this replaces the last patch on top of
origin/sb/remove-fd-from-ref-lock