Strong AI and data center demand helped Nvidia beat second-quarter expectations, while its upbeat outlook fueled fresh optimism in the stock.