Add support for chunked requests

This patch adds support for dealing with chunked POST and PUT requests. A chunked body contains sets of chunks as follows:

\<length of 1. chunk in hex\>'\r\n'
\<chunk data\>'\r\n'
\<length of 2. chunk in hex\>'\r\n'
\<chunk data\>'\r\n'
...
\<length of n. chunk in hex\>'\r\n'
\<chunk data\>'\r\n'
'0\r\n'
'\r\n'