Added event loop based on pecl/event

This is taken as-is from the original `nextTick` PR #234. If [loop-enable-disable](https://github.com/reactphp/react/tree/loop-enable-disable) goes ahead first I'll update the PR to match.