Dollar stores have avoided many of the troubles shaking up other segments of the retail industry because these stores are largely resistant to the “Amazon effect.”