MotoGP legend Rossi takes Gulf 12 Hours class win for Ferrari