Dollar General said it's attracting more middle- and higher-income shoppers who are seeking value.