Off-price fashion retailer Stein Mart is to go private after striking a deal for its takeover by a private equity firm.