Tesla Inc. has grown from Silicon Valley gadfly to the world’s second-largest automaker by market capitalization in the decade since its initial public offering. It’s been a roller-coaster ride for the electric vehicle maker’s shareholders, who have experienced dizzying swoons on the way to record highs thanks in part to self-inflicted crises.