Taken by surprise by Qatar’s decision to ban beer at stadiums, the company remade its marketing strategy in real time.