Amazon profits appeared to take a hit as it invested in the infrastructure needed for one-day deliveries of many items to Prime subscribers