Fixed two bugs on io_add_watch. It didn't return the ID of the event source, and checked if the fd already existed in the wrong place.
Added main_iteration().
Merge pull request #1 from aslepetys/master

Two bugs corrected