Iran, a big oil producer with a diverse economy, has shown its farming, manufacturing and distribution sectors can ride out long periods of war and sanctions.