Turkey has spent $12 billion, equal to roughly 15% of its foreign-currency reserves, to keep the lira stable during a week of global market volatility triggered by the war in Iran.