Revises chunk handler entirely 👨‍🔧
Revises chunk handler entirely 👨‍🔧

The old implementation appears to have multiple problems:
• While parsing meta-data, the byte stream may deplete for a while, leaving the system in an undefined state. This was fixed by copying the input to a temporary buffer first, and extracting only complete chunks from it.
• The extracted data was sliced from the original stream. This slice could be modified concurrently. Data is now passed on as copy.

#124

scireum/s3ninja,scireum/s3ninja