The rulings came in a lawsuit filed by a Tesla stockholder who challenged Elon Musk’s 2018 compensation package.