test: fix http-many-ended-pipelines flakiness
test: fix http-many-ended-pipelines flakiness

It can happen that the HTTP connection is closed before the server has received
all the requests, thus the server close condition is never reached. To solve
this, close the server when the socket is fully closed.

PR-URL: https://github.com/nodejs/node/pull/4041
Reviewed-By: Ben Noordhuis <59bd0a3ff43b32849b319e645d4798d8a5d1e889@bnoordhuis.nl>
Reviewed-By: Minwoo Jung <8ed4d68b4c6f320972a8484fc5a67b9b0188ed87@gmail.com>
Reviewed-By: Evan Lucas <ad0310dc5270cefb6ee6879263270aed9b1e9982@me.com>

dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node,dreamllq/node