Higher gas prices could end up benefiting Amazon’s e-commerce business as consumers focus spending on household essentials.