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.
Looks ok to me, what strikes you as incomplete?  There are some work arounds necessary with the EV extension in order to avoid segfaults across different versions of PHP, this is what your seeing here.