Valentino Rossi gives credit to team-mate Jorge Lorenzo after beating him to the line in a thrilling finish to the Catalunya MotoGP.