Use a stream filter for chunk encoding

This allow to be more decoupled in the Docker Adapter and also is a POC for a new way of dealing with callback.

This also fix some rare conditions where length of chunk was not correct and was causing a broken pipe, length is now directly get from php so it should be correct.

I'm currently thinking on using filter also when reading for the callback use, so we will be able to apply multiple callback / filter on the stream and have a more generic interface.

Let met know what you think /cc @ubermuda