implement the FLOW interface

Related to [mirage/mirage#203]
Related to [mirage/mirage#302]

When FLOW.close returns, future calls (not already running calls) to
'write', 'writev' and 'read' will return `Eof

Signed-off-by: David Scott <dave.scott@citrix.com>