http: Raise a hangup error on destroyed socket writes

Slightly less sad fix for #4775