[v6.x backport] http: eliminate capture of ClientRequest in Agent
Keepalive sockets that are returned to the agent's freesocket pool were previously capturing a reference to the ClientRequest that initiated the request.
This commit eliminates that by moving the installation of the socket listeners to a different function.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines