Nearly 10 years after buying Family Dollar for about $9 billion, Dollar Tree announced it would sell the retailer to two private equity firms.