Pope Leo's first encyclical addresses artificial intelligence, modern warfare, migration and historical injustices.