For generations, Japanese gangsters have styled themselves as heirs to the samurai—a mystique that helped them prosper in league with politicians, police, and big business.