Pope Francis leaves Japan, bringing to an end a long-desired visit marked by messages on atomic power and weapons as he comforted survivors of nuclear bombings and accidents.