Initial implementation of polling infrastrucutre

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Enable poll test

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
poll test improved

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Bug with events signaled on new file descriptor solved

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>