Tesla shareholders have approved a $1 trillion compensation package for chief executive Elon Musk, the largest payout awarded to a corporate leader.