libknc: further improvements to internal file descriptor handling.

We realise that each side of the connexion can have two separate
file descriptors, one for read and one for write.  So, we represent
this in our internal data structures and change the accessors to
reflect this.

We add knc_net_is_open() and knc_local_is_open() so that the
application can tell if we've reach EOF on either end.

And we add an interface to enable the building of simple event
loops using a context:

	knc_get_pollfds()
	knc_service_pollfds()

The former will fill in an array of struct pollfd in a way that is
suitable to be passed to poll(2) or pollts(2) and an array of
callbacks to be called when poll tells one that something is going
on.

These arrays can also be used to hook into arbitrary event loops
by interpreting their contents.