Functorise over event channel interface

We create an 'EVENTS' signature that is like 'ACTIVATIONS' only with the
other functions added (send i.e. notify; listen i.e. bind_unbound_port;
connect i.e. bind_interdomain). The Events_lwt_unix module is a layer
above xen-evtchn which implements this signature -- this should be upstreamed
into xen-evtchn itself.

This will allow us to unit test vchan by mocking the event channel interface
within a single unix process. It potentially also allows us to replace
event channels with some other mechanism (e.g. unix signals) if we really
want to.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Functorise over a grant sharing/exporting interface

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Complete the functorisation over MEMORY (Gnttab, Gntshr)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Move the Xenstore rendezvous logic to a separate module

This will make it easier to unit test without having to mock up
Xenstore, watches and transactions too.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: implement the CONFIGURATION signature

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: implement the Memory signature

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: implement the EVENTS signature

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
vchan: use the CONFIGURATION signature rather than the raw Xs one

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: add a simple connect/disconnect test

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: depend on OUnit

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

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
test: add a simple write-then-read test (which fails)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Hide internal details from the vchan interface

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Start making the Vchan type t serialisable, via sexplib

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Pretty-print ring pointers, domid and port.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add 'with sexp_of' to all the signatures we're functorised over

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Add a lot more 'with sexp_of'

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Pretty-print the left/right order and the send/receive buffers

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
The server reads on the 'left', writes on the 'right' (order)

This is the same as the libvchan convention.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Make -lxenctrl optional via configure script, update travis

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