Until India is militarily capable of handling Terrorist state of Pakistan (TSP) and People's republic of China (PRC) simultaneously, US should and will stay in the Afghanistan. Of course, I am not claiming that they will stay for us, they have their own reasons.
India is in amidst of modernising the army, navy and air-force. She would be ready by 2020. It is my guess that if current trends continue, India will try and avoid getting in any hassles till 2020 AD. My gut feelings say, it will be between 2020-2025 that India will be ready to exercise her hard-power to solve her problems to their logical ends.
Until then, the West and TSP will suffer attrition. Somehow, from current responses of India, it seems that she is not sure about her capabilities. In case of war, it should be and perhaps will be an all-out war with defeat and assimilation of Pakistan, completely or substantially. Pakistan has nothing to lose right now, whereas India has achieved quite a lot. Until we develop a technology to comprehensively protect everything that we have achieved, we won't go for direct war.
The policies and measures needed to be implemented in the process of readying India for her launch as global power are -
* Rural empowerment so that many people can stay in villages and earn respectably - (helpful in case of nuclear war) - India and Hinduism have historically been de-centralized entities. The village makes up the fundamental structural and functional unit of Indian civilization even today. If villages in most of India are provided with 24x7 electricity supply, investment in sustainable and renewable energy sources in rural India, access to water for drinking and irrigation, Roads and education, banking, insurance, basic consumer goods (FMCGs) rural India will fuel the growth of nation at much faster pace than world could ever imagine.
For the sake of record, it must be known that for 4800 years out of 5000 years of Indian history, India has been among the largest of all economies in world. India lost her prosperity when institution of village was destroyed by British. This needs to be reversed. This is where vision of Gandhi regarding village empowerment can do miracles.
Also, since the population will be scattered around, there won't be many casualties in case of nuclear fall-out. Also, the burden on cities like Mumbai will decrease a bit and economy won't be hit as badly as it will be now.
* Navy strong enough to assert dominance over Indian ocean - From Malacca to Hormuz/Suez. Atleast 4 aircraft carriers, 5 SSBN's required. Army strong enough to assert dominance over entire Indian subcontinent. It should be made clear to everybody that nobody can display their dominance in South Asia except India. USSR respected that when they invaded Afghanistan. USA needs to respect the influence of India on Indian subcontinent and Indian ocean, without which there can't be trustworthy Indo-US strategic relationship. Indian ocean and Indian subcontinent belongs to India.
* Functional missile defence shield with extensive coverage.
* Functional coverage of Indian navigational satellites (IRNSS) over entire Indian subcontinent - From Afghanistan to Myanmar.
* Ability to strike first with conventional weapons and strike hard in blitzkreig fashion of warfare so that Terrorist state of Pakistan (TSP) never gets a chance to retaliate. Ability to destroy most of its military infrastructure in a simultaneous strike on an unprecedented scale. Something like 2000 missiles (mixture of prithvi, agni, and others) with huge conventional bombs launched for different military and strategic destinations simultaneously immediately followed up by massive air strikes and infantry and marine invasions.
* Complete operationalisation of MCA, FGFA, LCA-mk2, GTRE-Kaveri and her subsequent improved versions, F-INSAS, and other programs which are still in pipeline.
* RAW functioning in subcontinent with at least 90% efficiency of Mossad and/or CIA with extensive network in Baloochistan, Afghanistan, Sindh, Myanmar, BD and Nepal.
* Increased covert operations by RAW in TSP by selective elimination of high-value people of Taliban, Al Qaida, ISI and their subsidieries.
* Reformation in Indic religions and assimilation of Islam into mainstream Indic society. This is expecting too much in such short time, but at least the awareness should be present among Hindus about the need of assertion of Hindu identity.
* Meanwhile, heavy investment in friendship with Afghanistan, Iran, Myanmar, Vietnam. Creation of sufficient good-will for India in Northern Afghanistan and Myanmar. Increasing the bilateral ties with Vietnam. There was a plan of Vajpayee government to build a railway-line from New-Delhi to Hanoi. I guess, that would be an excellent means of increasing presence and influence of India in south-east Asia. Liberal use of her soft-power in Afghanistan to make afghans and Iranians perceive Indians as good guys with power.
* Gradually increasing exertion of power by Saam, Daam, Danda and Bheda in Nepal and Bangladesh.
I guess, until objectives somewhat similar to these are met, India will avoid starting an all-out war with Pakistan. I guess looking at current rate of development, India will be ready by 2020. Hence time is running out for Pakistan and China to lure India into open combat when she is not ready. India should keep on building up her powers and inhibit the growth of Pakistan by maintaining a constant pressure. This is ensured by US presence in Afghanistan. They won't be able to solve the problem because they do not know what the problem is. If trends continue, they will continue to be present in Afghanistan for at least 10-12 more years and continue to suffer slow attrition. But, they will buy India precious time.
Analogy - It is like small bunch of honey-bees trying to sting a running elephant with thick skin. The elephant is India and the bees are militants and bee-hive is TSP. Know that when bee stings, she dies. India can sustain few more cuts before we grow large enough to eat the bee-hive and drink the honey. Meanwhile, bees are growing weak. Just that, we are being followed by a dragon (PRC) who is protective towards bee-hive but does not care about bees. The only interest of dragon is to keep bee-hive intact so that it can produce enough bees to trouble elephant, not more, not less. Hence, before elephant chooses to finish off the hive, it is practical enough for elephant to get stronger so that in case dragon thinks thrice before acting out in defence of hive. And even if dragon chooses to act, elephant is strong enough to resist any such attempts and repeal dragon out of its backyard. Furthermore, dragon is not problem-free. Its own backyard is full of problems and potential friends of the elephant. Elephant should be friends with distressed neighbours of the dragon.
Meanwhile, Eagle (USA) is wary of growing dragon and is pissed off by some stinger bees. Hence, the giant eagle is near bee-hive to fight the bees, but not bee-hive. Although the bee-eating rate of Eagle is ferocious, more bees it eats, more are still produced from Bee-hive. I guess, eagle will take time to learn that problem is the hive, and not bees. Eagle can't finish the hive without elephant but elephant demands or will demand larger share, rather complete share, since, there is no place for Eagle there.
Then there are Fox and Bear (Iran and Russia) waiting anxiously and are friendly towards elephant, but not towards Eagle.
The point is, there are so many other forces acting in this complex web of vested interests. Elephant is just one node of that complex web. The vector sum of all these forces will determine the coming world order. India has the right direction, but needs to increase its magnitude tremendously, so that it influences the resulting vector sum in its favour. TSP is a pawn. Its not just about capturing pawn, its about capturing it in such way that establishes complete dominance of India in subcontinent and Indian ocean.
I only hope that India has better leadership in next 10 years, unlike Manmohan Singh. I guess, this will be the last chance India will get to rise to the position of her former glory. If we mess these 10 years, we will be doomed to suffer for next few centuries.