Google bets AI, software can help its new Pixel 3 smartphones challenge Apple’s iPhone