Bug 1031122: Initial commit, adds license and master build file

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 1031122: Add poll loop

This commit adds a poll loop based on Linux' epoll. Users can add and remove
file descriptors at runtime and poll for events. When epoll returns an event,
the poll pool executes a user-supplied callback function.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 1031122: Add per-event type call-back functions

For individual event types, separate call-back functions can now be
registered. libfdio will select the correct function for an event,
or print a warning if no function has been registered.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 1031122: Add tasks

This patch adds support for tasks. A task is a function that runs in
the context of the poll loop. Tasks can be created from any thread,
allowing message passing from helper threads to the poll loop's
thread.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 1031122: Cleanup |fd_state| entry after fd removal from epoll
Bug 1031122: Use per-event callbacks for tasks

Tasks now handle EPOLLIN and EPOLLERR in two separate functions.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>
Bug 1031122: Mark public interfaces with "C" linkage

This patch marks public interfaces with "C" linkage. This allows
C++ programs to include them easily.

Signed-off-by: Thomas Zimmermann <tdz@users.sourceforge.net>