412712 - HttpClient does not send the terminal chunk after partial writes.

HttpGenerator._header and HttpGenerator._buffer may be null when
the content is written after a partial write.
In this case, the terminal chunk was not prepared, and therefore never
written.

The fix simply creates a HttpGenerator._header to prepare the terminal
chunk, so that it will be written.