A hat-trick for Wayne Rooney brought a 10-game barren run to an end in Manchester United's Champions League qualifier against Club Brugge.