Ridesharing services like Uber and Lyft may help reduce crime in cities. A new study links their presence to improved public safety.