Be more resilient when destroying the httpd request [v9.18]
requested to merge 3693-crash-when-restarting-server-with-active-statschannel-connection-v9_18 into v9_18
Currently calling isc_nm_read_stop() does not entirely prevent read callbacks that have been already scheduled on the netmgr loop. This could lead to double-free when the owner of the socket has own shutdown procedure.
Be more resilient when read callback is called with eresult != ISC_R_SUCCESS and don't detach from the httpd->readhandle if the handle has been already detached.
Closes #3693 (closed)
Edited by Ondřej Surý