Fix a race in isc_socket destruction.
There was a very slim chance of a race between isc_socket_detach and process_fd: isc_socket_detach decrements references to 0, and before it calls destroy gets preempted. Second thread calls process_fd, increments socket references temporarily to 1, and then gets preempted, first thread then hits assertion in destroy() as the reference counter is now 1 and not 0.
(cherry picked from commit 81ba0fe0)