Twice passed over for role of military chief before becoming think tank research fellow, Zamir enters position with country facing a surge in terrorism and threats from Iran