Fix race in unix socket code when closing a socket that has

already sent a recv/send event.

When doing isc_socket_cancel we need to purge the event that might
already be in flight. If it has been launched already we need
to inform it that it has to bail.

(cherry picked from commit 1286d74c)
42 jobs for !1916 with 834-fix-races-in-socket-code-v2-v9_12 in 12 minutes and 37 seconds (queued for 4 seconds)
merge request