Private-equity firm Roark Capital is nearing a deal to buy the Subway sandwich-shop chain for about $9.6 billion.