Use unfoldAndAdd(..) for now
Log various properties at startup time for easier diagnosis
Allow overriding the default allocator properties and log them / Prettier log
Fix DefaultChannelPipeline.first() so that it returns null when only the sentinel handlers remain (this is how DefaultChannelPipeline.last() works already)
Deprecate Bootstrap.shutdown() and use EventLoopGroup.shutdown() wherever possible

There are still some tests that use Bootstrap.shutdown() though.  They need non-trivial refactoring, which will come soon.
Remove MultithreadEventExecutorGroup.DEFAULT_POOL_SIZE

- We should never define a default nThread for MultithreadEventExecutorGroup because we don't know what a user do with it.
Add MultithreadEventLoopGroup.DEFAULT_EVENT_LOOP_THREADS / Add DefaultThreadFactory

- Allow overriding the default thread factory when a user specified no thread factory
Keep Socket/SctpTestPermutation from creating too many event loops

- Also made the event loops created by *TestPermutation use daemon threads for simplicity (i.e. no need to shut down the event loops)
Remove special handling of Object[] in codec framework (a.k.a unfolding)

- Fixes #1229
- Primarily written by @normanmaurer and revised by @trustin

This commit removes the notion of unfolding from the codec framework
completely.  Unfolding was introduced in Netty 3.x to work around the
shortcoming of the codec framework where encode() and decode() did not
allow generating multiple messages.

Such a shortcoming can be fixed by changing the signature of encode()
and decode() instead of introducing an obscure workaround like
unfolding.  Therefore, we changed the signature of them in 4.0.

The change is simple, but backward-incompatible.  encode() and decode()
do not return anything.  Instead, the codec framework will pass a
MessageBuf<Object> so encode() and decode() can add the generated
messages into the MessageBuf.
Fix typo
Fix IndexOutOfBoundsException raised when numHeapArenas and numDirectArenas differ

- Fixes #1227
Fix misleading example in ByteBuf
Fix performance regression which was caused by calling the fireInboundBufferUpdated() a way to often

* Also use a ThreadLocal for the decoder buffer to safe space as it is cheap
Optimize to minimize volatile reads to access next buffer in codec framework
Share same ThreadLocal for all decoder/encoders to minimize memory usage
Move drain logic to OutputMessageBuf and optimize it as far as possible
Proper assertion instead of blindly clearing the OutputMessageBuf
Optimize OutputMessageBuf.drainToNextInbound/Outbound()

- Return early when the buffer is empty
- Keep only the number of byte buffers
- Remove unnecessary null check in the loop (because we know buffer is not empty at certain point)
Make sure to release the buffer when it's written to the next byte buffer

.. otherwise it will leak.
No need to have nested try blocks

.. because the catch block catches everything and rethrows it