Move functions further up the file (no semantic change)

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
On plug, launch a TX/RX ring-polling thread

This allows TX to work immediately, before the application is
ready to call listen(). All RXed packets are sent to the
receive_callback which is initially (fun buffer -> return ())
i.e. the packets are dropped. Previously the packets would be queued
in the RX ring and then dropped by the backend once the ring
filled up.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>
Merge pull request #8 from djs55/listen-early

Fix / workaround hang on server start
release 1.1.0
detect invalid network packets

Packets must be fully contained within one page,
otherwise netback rejects them with "Cross page boundary, txp->offset: b68, size: 1460".
See https://github.com/mirage/mirage/issues/234.

This means that V1.NETWORK.write and V1.NETWORK.writev must use only
buffers that have off <= page_size and off + len <= page_size,
it is not enough that len <= page_size.

If you use the Channel module this property seems to be respected.
bump to 1.1.1 and regenerate