Fixed a  ChannelClosedException

littleproxy is terminating the connection to DeployIt server right after the request headers are sent in an ordinarly termination sequence.

Debug output verbosity increase:
-------------
import java.util.logging.*;
Logger.getLogger("org.littleshoot.proxy").setLevel(Level.ALL);
def ch = new ConsoleHandler();
ch.setLevel(Level.ALL);
Logger.getLogger("org.littleshoot.proxy").addHandler(ch);
System.out.println("Setup logging to ALL");
-------------

1. restart the master
2. setup verbose logging (slow because of classloading)
3. run the test cycle
4. watch nohup.out

The first run succeeds and the output from little proxy is:

Jun 10, 2013 4:45:21 PM org.littleshoot.proxy.HttpRelayingHandler messageReceived
INFO: Finished processing message

In between time out message?

Jun 10, 2013 4:46:02 PM org.littleshoot.proxy.HttpRequestHandler onRelayChannelClose
INFO: Not closing browser to proxy channel. Still 0 connections and awaiting 0 responses

I then start the next build and the processing of the problematic request is:

Jun 10, 2013 4:47:21 PM org.littleshoot.proxy.HttpRequestHandler processMessage

------------
It turns out that the channels that's being created in 16:47 isn't being used. The error is on 0x0b43e0f7 that's created a lot earlier, and it's leaped by the idle thread.

The first read packet that arrived, little-proxy tries to forward that and it tries to send it on a channel that's already closed.

------------

We think what's going on is that:

  - HttpRequestHandler.processMessage creates a new connection but forgets to set to 'this.currentChannelFuture'.
  - a payload arrives and it chokes:

   java.nio.channels.ClosedChannelException
    at org.jboss.netty.channel.socket.nio.NioWorker.cleanUpWriteBuffer(NioWorker.java:636)
    at org.jboss.netty.channel.socket.nio.NioWorker.writeFromUserCode(NioWorker.java:369)
    at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:117)
    at org.jboss.netty.channel.Channels.write(Channels.java:632)
    at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:70)
    at org.jboss.netty.channel.Channels.write(Channels.java:611)
    at org.jboss.netty.channel.Channels.write(Channels.java:578)
    at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:259)
    at org.littleshoot.proxy.HttpRequestHandler$1.operationComplete(HttpRequestHandler.java:243)
    at org.jboss.netty.channel.CompleteChannelFuture.addListener(CompleteChannelFuture.java:53)
    at org.littleshoot.proxy.HttpRequestHandler.processChunk(HttpRequestHandler.java:239)
    at org.littleshoot.proxy.HttpRequestHandler.messageReceived(HttpRequestHandler.java:216)

on the upstream, https://github.com/adamfisk/LittleProxy/commit/f540936cca8c5d5072f4e5337b1bee40045850ee introduces a seemingly related change that sets this value.