Make nailgun_client error when the client socket is closed. [BUGFIX]

Review Request #2727 - Created Aug. 30, 2015 and submitted

Patrick Lawson
jsirois, stuhood, zundel

Previously, if the client socket was closed gracefully on
the other side (by the nailgun) while at the start or middle
of attempting to read a message from the socket, the client
would go into a hard loop attempting to do a blocking read
on the socket. But when the socket has been closed, that
blocking read returns immediately with no bytes to indicate
that the socket is closed.

Added tests to exercise the two new exception types and the
various interesting points in the message byte stream where
the server could terminate the socket.

CI is green:

Patrick Lawson
Patrick Lawson
Eric Ayers
John Sirois
Patrick Lawson
Patrick Lawson
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted @ 561b31c77ab34ef80e6e5f239c4da64e263baedf