http: Break apart http_req() monster in preparation for async http client