US discount retailer Dollar General has posted a 41% rise in quarterly income, helped by higher sales of groceries and seasonal products.