Turkish President Recep Tayyip Erdoğan has denounced the Israeli violence in Gaza and Lebanon, comparing the present circumstances to some of history's most devastating genocides.