Walmart is turning the most stressful part of grocery shopping, the checkout line, into a test bed for artificial intelligence that does the work of a human cashier and a personal shopper at once.