Gunmen opened fire near the Israeli consulate in Istanbul, triggering a gun battle with Turkish police.