Handle "too many bytes in stream" for uploads.

Adds a test to detect if `StreamInChunks` completes without exhausting the
provided stream; this should probably be made configurable.