test: check that all resources are cleaned up afterwards

This test currently fails because event channels are leaked.

Signed-off-by: David Scott <dave.scott@citrix.com>
Close event channels

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