Add a cleaner "in-memory" events implementation

This replaces the Xen-like array of event channels with individual
records in the heap, each of which has a counter and a condition
variable.

Eventually this module should probably be moved to xen-evtchn.

Signed-off-by: David Scott <dave.scott@citrix.com>
test: switch to OUnit2 main loop

Note we run the tests sequentially because the sharding seems to go
wrong when combined with Lwt.

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

Signed-off-by: David Scott <dave.scott@citrix.com>
test: even if a test fails, close the connection

Failure to close a connection causes all subsequent tests to fail
because "some grants are still mapped in".

Signed-off-by: David Scott <dave.scott@citrix.com>
Fix ring corruption by properly initialising the ring

When the server creates the ring, it must set the
{left,right}{consumer,producer} pointers to 0. A cut and paste
error caused us to set the left consumer twice, and miss
the right producer. This would cause spurious data to appear
if the page was not already fully zeroed.

Note that if the server does not trust the client (for example
in an implementation on Xen) then the shared memory pages must
either be zeroed otherwise sanitised before they are granted
to the client.

Signed-off-by: David Scott <dave.scott@citrix.com>
Merge pull request #57 from djs55/refactor-modules

Add a cleaner "in-memory" events implementation