Fix the problem that when body is empty no terminating chunk is sent for chunked encoding.

See also https://github.com/web2py/web2py/pull/567 for reference.