return partial results early

When using Excon with a service that streams responses chunk by chunk, it currently blocks and waits until either chunk_size is reached or the full response is received. For some services, it is helpful to get partial results early and act on them (e.g. tickers or long-running requests).

Socket#read will raise an error when the user tries to read before the buffer is ready. This is normal with chunky responses. So when the read jumps into the rescue clause, check if something is already in the buffer. If so, don't wait and retry, but deliver the result first and retry after.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>