Added some generalization to handling oob objects in event loop.
Does not add any new functionality as such, but makes it easier
to add new stuff in future.

Signed-off-by: Timo J. Rinne <tri@iki.fi>