War has laid bare the weakness of the Iraqi state, highlighting risks for the country's investment climate that are likely to last beyond the fighting in Iran.