Support chunked transfer encoding
Merge pull request #4 from drkibitz/transfer-encoding-chunked

Transfer encoding chunked, and more cleanup