Rapinha was Barcelona's two-goal hero as they won a heated Spanish Super Cup final against Real Madrid in Jeddah.