Ireland has voted to be the world's first country to fully divest public money from fossil fuels.