Walmart’s stock heads for a record after another earnings beat, as general merchandise sales turned positive.