Higher-income customers are boosting the performance of discount retailers Dollar Tree and Dollar General.