Pizza Hut will be sold in two deals totaling $2.7B as the chain faces declining sales and widespread store closures.