A law firm representing Elon Musk and Tesla helped draft legislation to overhaul Delaware's corporate law amid an ongoing court…