[squash] Rework code preparing a HTTP response for sending in lib/isc/httpd.c

27 jobs for wpk-get-rid-of-socket-v-functions in 9 minutes and 23 seconds (queued for 11 seconds)