Close the client socket on exceptions.

As-is, a Nailgun session may not close the socket if an exception is
encountered. The session should be closed in the _finally_ block.
Is there a more idiomatic way to do this? This seems correct, but awkward to me.