It was one of the most infamous companies in Japan, rocking the nation with a corporate scandal that ousted a prime minister and then nearly collapsing under a mountain of debt.