Turkey's top intelligence agency chief resigns