Extract resumable upload chunk handling to a new ChunkStack class

TBR=sgjesse

Review URL: https://codereview.chromium.org//390183010