UK beer sales have taken their biggest quarterly leap this century while on-trade losses slowed, new figures have shown.