Tesla stock gains after RBC ends bearish call with upgrade