storage: support resumable uploads

## Do not merge!

RE: #298

It works!

It's 200 lines, but it works!

(Still needs tests, but regressions work as usual)
The code should be good to review. I wrote up a "Developer Documentation" that should explain the flow, and tried to comment a lot throughout.