Add method `length()` to `ChunkedInput`

ref #2741

1. Add method `length()` to `ChunkedInput` 
2. `ChunkedWriteHandler` can notify `ProgressivePromise` with total number
no need for this.