The influential prime minister worked to revive the economy with his trademark “Abenomics” and rebuild Japan’s role on the global stage. His assassination stunned a nation where gun violence is rare.