Add shutdown method to Environment

To allow an Environment to be cleaned up a shutdown method has been
added. The shutdown method shuts down each of the Environment's
Dispatchers, giving them a chance to tidy up any threads that they
created.

Fixes #85
Use a mock rather than thread count

Using live thread count isn't reliable as the number of live threads
may change for reasons outside the control of the test. Instead,
use mock Dispatchers and verify that their shutdown method has been
called.
Advance past delimiter when it's being stripped

Update Buffer so that when it's splitting on a delimiter and stripping
the delimiter, it advances past the delimiter. This stops the previous
segment's delimiter from being included at the start of the next
segment.
Polish previous commit

Fix the mangled javadoc.
Turn View into a String more concisely
Improve shutdown of TcpClient and TcpServer

Previously, when TcpClient and TcpServer were shutdown, they would
leave threads running as neither class was correctly shutting down
Netty. This commit updates both TcpClient and TcpServer to shut down
Netty as part of their shutdown processing.

As part of this commit, the Netty dependency has been updated to
4.0.0.CR6. This is the latest 4.0.0 build available at this time.
A benefit of this upgrade is that Netty's EventLoopGroup now has
built-in support for being shutdown gracefully, making it easier
to clean up all of Netty's threads.

The Netty API has undergone some changes between 4.0.0.Alpha8 and CR6,
most notably in the handling of inbound messages: a MessageList is
now passed to a ChannelInboundHandler. A handful of updates have been
made for compatibility with the new API.

An unfortunate side-effect of the move to CR6 is the introduction of
Netty's GlobalEventExecutor. This class uses a single thread for
event execution. This thread will die after one second of having no
tasks to execute but there is no method that can be called to make
this happen quicker. This requires us to resort to sleeping for one
second during shutdown to give this thread a chance to die.

The bind and connect methods are no longer available on ChannelHandler
which broke LoggingHandler. The logging of bind and connect has been
moved to NettyTcpServer: into the bind future listener and into the
channel initializer respectively.

Completes #88
Created a ReactorTaskExecutor that implements both Spring's TaskExecutor and the JDK's Executor interface. This allows a Reactor to be used as an Executor for components that need one and ensures that those components are executing tasks in the same thread as the Reactor.
Tweaks to the TcpClient close Promise test. The CI server exhibits different behavior on the close Promise than do tests run locally. I tweaked the test to wait for a latch to be counted down rather than wait on the close Promise to be fulfilled.
Refactored the Composable/Stream/Promise chain to separate the publishing of values from the consumption of values. This was done by introducing a Deferred class, from which Promises or Streams can be created. The Deferred is the object with the accept() methods on it, making it essential that code that needs to publish values into a Stream or Promise maintain a reference to this Deferred. The code is then free to return the Stream or Promise to the caller by calling Deferred.compose(). The Future class was eliminated in favor of await() and get() methods on the Promise class itself. Base functionality like map() and filter() are provided by the abstract Composable class while more specialized functionality like reduce(), first(), last(), batch(), onSuccess(), onFailure() and others are provided on the Stream or Promise class as appropriate.
Tweak to valueAccepted to recognize the first element of a batch.
Cascade errors, add value, error, supplier helpers for Deferred.PromiseSpec, added test for catching errors downstream.
meaningless hasBlocker
fix some tests
Fix reduce vs batching and tests
copyright
add reduce()
composable parent
remove supplier iface from Composable and rename get to resolve()
solve more tests
add cursor support helper to snapshot a volatile value from Stream
Significant updates, bug fixes, javadoc on Stream, Promise, and their tests.

- Refined the separation of producer and consumer around Deferred, Stream, and Promise.
- Removed some methods from Reactor that involved a "map" function between a Reactor and a Stream. The implementation as it was didn't account for the common uses of Reactor where no replyTo is set on the Event so the "map" operation would never complete. This functionality should be implemented in an EventStream class whose job it is to make sure that events can be propagated through a stream in a fashion similar to the FSM implementation.
- Fixed Stream tests to reflect recent API changes.
- Got halfway through the Promise tests, changing them to reflect recent API changes.
Sync dispatcher between Stream/Promise downstream components, fix benchmark tests
More tests fixed
fix Promise Specs (comment when/merge for now)