Months after discount retailer Big Lots filed bankruptcy, the chain has reached a deal to keep hundreds of stores open.