Pluggable algorithm to choose next EventLoop

Hello,

this PR introduces a way for developers to plug their own `Next-EventLoop Algorithm` into `NioEventLoopGroup` and `EpollEventLoopGroup`. Additionally an API to gather metrics from the `EventLoop`s is introduced.

This PR is still missing most of the tests. I haven't been able to execute on my GENIUS vision of a unified test class for all `Channel` / `EventLoop` implementations that use a `MetricsCollector` YET. So I didn't include this code here (it's coming and something to look forward to though :smile: ). Despite that, I think the code is ready to get some feedback from @normanmaurer and @trustin.

Some issues I would love to get you guys input on:
* I am not a fan of the name `MetricsCollector.(start|stop)processIo()`. Would be thankful for naming suggestions.
* I think `EventLoopChooser` sounds odd. How about `EventLoopScheduler`? That sounds more powerful.
* I think it would make sense to extend the `(Nio|Epoll)EventLoopGroup` constructors to additionally accept a standalone `MetricsCollectorFactory` object (and also have `EventLoopChooser` implement this interface). That way a user could only gather metrics and continue to use the default `EventLoopChooser`.
* Since @normanmaurer and I decided to gather metrics by integrating the metric hooks directly into the code, instead of using a separate `ChannelHandler` we have more freedom in which metrics to collect. Anything missing in the current implementation that would be useful?

Thanks,
Jakob
Then you should refer to EventExecutor

> Am 18.08.2014 um 19:44 schrieb Jakob Buchgraber <notifications@github.com>:
> 
> In common/src/main/java/io/netty/util/metrics/MetricsCollector.java:
> 
> > +     *
> > +     * @param bytes number of bytes written.
> > +     */
> > +    void writeBytes(long bytes);
> > +
> > +    /**
> > +     * This method is called before the EventLoop reads/writes data from/to the network and before any events are
> > +     * fired through the pipeline.
> > +     * <p>
> > +     * This method can be used together with {@link #stopProcessIo()} for measuring the time the EventLoop
> > +     * spends on processing I/O (including ChannelHandlers).
> > +     */
> > +    void startProcessIo();
> > +
> > +    /**
> > +     * This method is called after the EventLoop finishes with any I/O work as described in {@link #startProcessIo()}.
> same as above. no dependency.
> 
> —
> Reply to this email directly or view it on GitHub.