SAN FRANCISCO — Tesla Inc. is set to defend itself for the first time at trial against allegations that failure of its Autopilot driver assistant feature led to death, in what will likely be a major test of CEO Elon Musk's assertions about the technology.