created a new interface to deal with chunked responses

replaced the callable $chunkHookFn with the new interface ChunkHook