Okay. My humble two cents on the idling part:
1. Idling before staring off/cold start - The engine consists of many moving parts that are constantly rubbing against each other when the engine is started and till the time it is switched off. To avoid wear and tear due to this friction, these parts need to be lubricated (like the thin film of fluid between our eye and the eyelid- we do not feel any rashes while blinking our eyelids because of that fluid). This lubrication is done by the engine oil. In a four stroke engine, this engine oil is stored in an oil sump from where is is pumperd to various parts of the engine through various oil lines by means of an oil pump (in a two stroke engine,the oil is directly mixed to petrol and therefore lubrication srarts the moment that engine is started). Now obviously, the oil pump would take a few seconds to circulate oil to the moving parts of the engine after the engine is started. We also know that the faster the friction (which would occur if the engine id revved higher), the more the wear and tear of the moving parts. This is why one should wait for a few seconds (say, 30 seconds) before starting off in a cold engine scenario. Once the engine is switched off, the entire engine oil trickles down back into the oil sump, but this takes time. Ideally, if a vehicle has been given a halt of,say, 30 minutes or more, it shall always be good if the engine is idled for 30 seconds before moving off. For the same reason, one should not rev a cold engine. Drive sedately for a couple of kilometres and then, open up. Consider an engine like the human body. We warm up before starting to exercise, don't we? What happens if we start exercising vigorously without warming up properly? Cramps,sprains,muscle pulls,etc. Same happens to an engine. Isn't this lovely - this striking resemblance between the human body and a car. We have lungs, the car has air filter. We have kidneys, the car has oil filter, we have a heart, the car has cylinders, we have valves in the heart, the car has valves in the cylinder head, we have a nose, the car has an air intake. We have a mouth, the car has a carburetteor/Fuel injector. We have arteries and veins, the car has fuel/oil lines. We have an exhaust

,the car has an exhaust !!
2. Idling before switching off the engine: this is reqquired only for turbocharged engines. The turbo spins at speeds like 140000 rpm and so it requires lubrication till the time it has come to a halt. Coming to a halt from speeds of 140000 rpm requires some time. When we rev our cars to,say 5000 rpm, the tacho takes about a second or two to fall back to zero rpm, no? That is whi one should idle a turbocharged engine for a minute or so to allow proper lubrication of the turbocharger till the time it comes to a complete halt. Some turbocharged engines are fitted with a delay shutdown mechanism to facilitate this. However, if this becomes too much of a chore, one can alternatively drive one's car at a rpm range where the turbo doesn't start to spool (e.g. below 2000rpm for Maruti Swift, below 1500 rpm for Nissan Micra/Renault Pulse, etc) for about a minute before ending one's journey so that the turbo gets enough time to come to a halt before one stops and has to switch off the engine. To put this simply, drive your turbocharged car very slowly for about a minute before coming to a halt.
Hope this explanation puts and end to all idling doubts.