Family Dollar to close nearly 1,000 stores