add support for Ev extension (libev)

Brought https://github.com/reactphp/react/pull/178 inline with current branch.  Fixed unit tests.  added additional unit test for periodic timer.
I know using `isset()` here could help us avoiding at least one useless method dispatch (when the stream is actually registered in the event loop), but I guess we can remove it and just call `removeReadStream()` and `removeWriteStream()`.