Rename library to React
[EventLoop] Default stream_select read and write arrays to null
Add two different methods to remove listeners for read and write events.

Those methods are not yet part of React\EventLoop\LoopInterface, we need
to fix the current implementation of the libevent-based loop class before
"promoting" them.

This commit also fixes the iteration on callbacks registered for write events.
Use named arrays to store streams for stream_select().

This makes detecting existing stream entries faster, and stream_select()
does not seem to care about arrays with non-sequential keys.
Unsubscribe stream from events when listeners return FALSE.

When a listener return FALSE, the event loop unsubscribeis the related
stream from read or write events.
Handle empty read / write sets and EOF.

Unfortunately stream_select() emits warnings and does not honour the
specified timeout when all of the three FD sets are empty. When we have
no more streams listening for events, we abort the loop.
Pass the event loop instance to event listeners.
Reimplement the libevent-based event loop.

The previous implementation was based on wrong assumptions on how the
PECL libevent extension works. Please note that this class must be used
with PECL libevent v0.0.5 since they fixed a bug in which "event_set()"
was resetting the event base.

Due to a bug, most likely in the PECL extension, this class is not able
to use file streams as it considers them invalid streams. There is an
open issue on the PECL bug tracker for the libevent project:

  https://bugs.php.net/bug.php?id=59728

Everything works fine with socket streams and STDIN, STDOUT, STDERR, etc.
Use shorter variable name.
[EventLoop] Simplify some of the previous changes
Merge remote-tracking branch 'nrk/loop_streamselect'

* nrk/loop_streamselect:
  Pass the event loop instance to event listeners.
  Handle empty read / write sets and EOF.

Conflicts:
	src/React/EventLoop/StreamSelectLoop.php
[EventLoop] Stop method, fixes #24
Merge remote-tracking branch 'nrk/loop_libevent'

* nrk/loop_libevent:
  Use shorter variable name.
  Reimplement the libevent-based event loop.
[EventLoop] Addd remove[Read|Write]Stream to LoopInterface
[Socket] Implement buffered async writing and closeAfterWriting
[EventLoop] Associate only one listener per each stream event type.

Allowing multiple listeners makes code more complex and it is beyond
the scope of the whole event loop abstraction anyway.

Such a requirement could be easily satisfied on a higher level if a
class wrapping the event loop needs to notify more than one listener
about changes in the status of a stream resource.
Tiny CS fix
[EventLoop] Fix oversight after code changes.
[EventLoop] Implement timers for the stream_select() based loop.

Timers can be one-shot or periodic and both are cancellable by using the
signature returned when adding them to the event loop. Periodic timers
can be cancelled also by returing FALSE from the provided callback.

The event loop will continue to run even without any registered stream
until there is at least one timer scheduled for execution or the loop
is explicitly stopped.
[composer] Add composer.jsons for all components so they can be subtree-split