Alphabet is on the cusp of overtaking Nvidia as the world's most valuable company, riding on a record stock rally fueled by its artificial intelligence efforts and booming cloud business.