With the move, Walmart, the nation’s largest grocer, is signaling bigger ambitions in the pet industry after decades of selling dog food and other pet supplies.