Added graceful shutdown on SIGHUP

Likewise to my note on line 232, should is_keepalive be false if connection == 'close'?