maintain IO.read EOF behavior in Socket#read

When EOF is met at the beginning, it should return +nil+ if +max_length+
is given, or an empty string if +max_length+ is +nil+.
add Socket#readline

Uses Socket#read for non-blocking readline and respects :read_timeout
read response until status-line is found

RFC2616 states that the server may still send optional metadata in the
trailer for a chunked-message, with the understanding that it may be
discarded by the client if no TE header is sent.
These were already being ignored, since the response stops reading after
the last chunk. However for persistent connections, these must be read
before parsing the response for another request.
Merge pull request #312 from burns/response_parse

Discard optional trailer in chunked responses