In a wide-ranging Irish Examiner interview, the former president discusses Gaza, climate failures, artificial intelligence and Ireland’s changing defence policy