Functorise the module over a CHANNEL signature, to remove a Unix dependency

This will make the code more Mirage-friendly.

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