correct test client to close synchronously with last send
Noticed previously the test client lifetime is decoupled from
the actual send activity. With SSL if the connection starts but
there is a period of SSL-layer "blocking" (actually fail-and-retry)
the mirror lifetime could be exhausted before the connection really
completed, making it stall after it was then closed.
This corrects that so connection lifetime management is done in the
send callback.
Signed-off-by: Andy Green <andy.green@linaro.org>