Uber’s rosy results contrasted with rival Lyft, which delivered a disappointing outlook and signaled the troubling shortage of drivers would spill over into the second quarter.