Johnson & Johnson spun off liabilities — including roughly 38,000 lawsuits — linked to claims of asbestos contamination in its baby powder to a new firm, which then declared bankruptcy.