The ride-hailing company said it would work with drivers to transition their cars to electric vehicles, a move it called a “radical shift in strategy.”