Nokia Oyj reported first-quarter adjusted profit that beat analyst forecasts, as its push into artificial intelligence and cloud software paid off.