Making an autonomous vehicle is proving harder and costlier than many startups predicted. So they’re teaming up with giants like Hyundai, Jaguar, and Ford.