ws: Add support for Chunked Transfer Encoding.

supported for chunked transfer encoding and added/updated related test cases.
fixed some typos and a potential bug.

Fixes #649
Please add a space before the parentheses on this line, and wrap the GBytes argument to the next line using spaces to indent to the correct column.