Nvidia Corp.’s earnings report needed to be perfect for a stock that’s added nearly $2 trillion in market value in the past year. In the end, a broad beat still sparked a selloff.