Total to buy 50% stake in Adani solar unit for $510 million