cli: support SSL as well as plaintext sockets
cli: support SSL as well as plaintext sockets

We hide the difference with a Channel.t, which contains both
buffered input and output channels (used by Cohttp only) and
raw read/write of Cstruct.ts.

Note this mix of buffered and unbuffered I/O only works because,
for all the protocols we're interested in (NBD and 'chunked'),
the server doesn't send any data immediately after the HTTP
response write: the server waits for data from the client,
at which point its safe to switch to unbuffered I/O.

Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@eu.citrix.com>

djs55/ocaml-vhd,xapi-project/ocaml-vhd