Lyft is joining forces with Google’s automotive business to develop self-driving cars, company officials said.