Tesla Inc. directors, including Elon Musk, awarded themselves massive compensation packages over a three-year period that improperly siphoned hundreds of millions of dollars out of the electric-car maker’s coffers, a Detroit pension fund invested in the company alleges.