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.
This is an artifact from debugging the segfaults in the earlier versions of the extension with PHP 5.6, needed to test against the latest version.  I'll test again against the pecl install to see if I can replicate this issue.