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.
The callback should be invoked by passing the current loop instance as the 2nd argument, so this line should be `call_user_func($listener, $stream, $this);`.