Record-breaking Cristiano Ronaldo was Real Madrid's match-winner as they beat Bayern Munich to reach the Champions League semi-finals.