Caesars strikes deal to end main unit’s bankruptcy