Ensure close connection header gets set

Fixes #1958

Also fixed a bug where `Connection: Keep-Alive` header was being set for
HTTP 1.0 clients when the connection was being closed.

Addendum: resolves a merge conflict given that 2.2.x does not handle headers with no values (a change made for master).