http: move ResponseWriter code into MessageWriter