sheep/http: add option 'buffer=' to adjust size of buffer for kv

In some testing environment, large size of buffer will make
the performance of swift bad because kv will split buffer into too many
requests and send out, which lead to congestion in network; but small size
of buffer will make the speed of receiving http request slow. After all,
we found out that 8MB is the best value for our environment.

Even the 8MB is good, the size of buffer is difficult to choose in different
environment (different hardware of servers, different number of nodes, etc.),
so we should add this option to let users choose buffer size.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>
sheep/http: add check for return value of http_request_read()

When users kill the curl which is uploading large files, the http_request_read()
will return 0 and lead to dead loop, so we should check it.
We also add code to free space of alloc after error happens.

Signed-off-by: Robin Dong <sanbai@taobao.com>
Signed-off-by: Liu Yuan <namei.unix@gmail.com>