Xavi scored one and made the other as RB Leipzig boosted their top-four ambitions with victory over a wasteful Dortmund side.