Jim Cramer uses the example of Shopify stock to explain the difference between gambling and investing.