tests: wsgi: close socket on error in the middle of chunked response

http://rhodesmill.org/brandon/2013/chunked-wsgi/