Fixes the problem where the promise of the outbound operation that causes a channel closure is notified after channelInactive()

- Fixes #1897
[#1895] Fix IllegalStateException which was produced during failing ChunkedWrite after the channel was closed
[#1898] No call fireExceptionCaught but just fail the write promise
Remove redundant index check
Pass eventLoop and childEventLoopGroup as Channel constructor parameters

- Add ServerChannelFactory for ServerBootstrap which is the counterpart
  of ChannelFactory for Bootstrap
Rename getChildGroup() to childEventLoopGroup() / Minor cleanup
Allow empty handler list when creating a new EmbeddedChannel

.. so that it can be used for dynamically initialized pipelines

- Fixes #1899
Fix compilation errors / Cleanup
Merge remote-tracking branch: upstream/master