Adapt to the Cohttp 0.10.x API which signals Eof/Error explicitly

See avsm/ocaml-cohttp#94 for the rationale behind the change.
Merge pull request #11 from avsm/fix-for-cohttp-0.10.0

Adapt to the Cohttp 0.10.x API which signals Eof/Error explicitly