Drugmaker Endo International got a New York bankruptcy judge’s approval for its Chapter 11 plan that aims to cut more than $5 billion in debt and hand over ownership to its lenders, roughly a month after it finalized a $465 million deal to resolve criminal and civil opioid claims.