block-read-sector: create the file if it doesn't exist; truncate if it does

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Fix vchan_http

'read' should behave like Lwt_io.read: 'at most n bytes'
'read_exactly' should behave like Lwt_io.read_into_exactly: 'exactly n
  bytes or None if EOF'

Fixes jonludlam/xen-testvm#4

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
read sector should read 1 sector, rather than 8

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #3 from djs55/turn-on-events

block-read-sector: now returns data
Merge pull request #5 from djs55/turn-on-events

read sector should read 1 sector, rather than 8
block-write: read/modify/write a 512-byte sector

Mirage only supports write_page, so use that. In future mirage's
blkif needs to support sector-granularity writes.

NB the rather hacky way we assume we can take the read_512 output
and stuff it into write_page.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #6 from djs55/turn-on-events

block-write: read/modify/write a 512-byte sector