rewrite StreamSocketClient#contents

rely enterly on fread instead of stream_get_contents, because it was blocking
in a bunch of tests i've did, while fread never let me down.
rely enterly on fread
close socket if response is HTTP/1.0 and/or connection is closed