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.
Format adjustments.

Fixes #649
Closes #824
Reviewed-by: Stef Walter <stefw@redhat.com>