Set length and encoding properly when HEAD response

`TransferEncoding` should never be set to `chunked` when responding to a `HEAD` request, as it causes the response writer to encode a body to the wire. However, the server should be able to set a `ContentLength` when responding to `HEAD` requests and shouldn't be required to include a body.