The company had made an expensive bet on robot taxis, but the project was laden with legal problems and burning through cash. So Uber gave it away to another startup.