Add context option to log response headers
Fixed PHP-700: request/cursor mismatch

Discard of the socket when we have to return a failure, such as on timeout.

Although there is technically nothing wrong with the socket, our next
read to the server will return the data we are attempting to read right
now, hence resulting in completely random reply
Merged Pull Request #371

* pull-request/371:
  Fixed PHP-700: request/cursor mismatch
  Add context option to log response headers