Let me make a prediction. Of course it is easy to make predictions when no one can catch you out and say "Nyahaha haa you were wrong!". But despite that I will make a prediction. And if I am right - you heard it here first.
The US will pull out of AfPak. Before that they will get a "commitment" from Pakistan that Afghanistan will not be used for anti-US activities. Pakistan will readily acquiesce to such a demand but extract the price that India should be kept out. This will be an easy concession for the US to give. India will be out of Afghanistan.
Control of Af-Pak will then become a "joint US-Pakistan" effort. US troops will go home and the US will retain some bases and facilities within Pakistan.
If you rewind to 2001 - the US did not require troops on the ground to scatter the Taliban and decimate the little infrastructure they had. Destruction is after all easier than building. Since the US preserved Pakistani influence in Afghanistan and treated Pakistan as special - the relationship can continue. It is only right that the US should trust Pakistan as it has always done. Pakistan can declare victory and the US can get its troops home saying that the Al Qaeda has been defeated and bin Laden presumed dead.
What could happen after that is worth some speculation. Pakistan of course will move right back into Afghanistan. Karzai will be deposed and a Taliban friendly government will rule Afghanistan from Kabul. Any Talibanic extremism in Afghanistan will only "prove" that Pakistan was right all along that Afghanistan and not Pakistan is the source of extremism which Pakistan will then control.
Will terrorism against India restart in earnest?

When did it stop? Terrorism against India was in full swing until November 2008. After that there have been further attacks in India albeit with lesser frequency. But infiltration across the border remains high. Even today two men have been killed. Terrorism against India has never stopped despite the myth that has occasionally been pushed on here to suggest that it has "stopped" due to US influence. Of course I am sure the US has played a variably positive role here. When Pakistani actions against India have led to a situation where US interests in Pakistan could be damaged, the US has stepped in to press on one or both parties to back off - and this has meant some pressure on Pakistan as well as some intel sharing with India.
To me the only question is how much of this will continue after the US "hands over AfPak to Pakistan. The US as I have repeatedly stated is in a balancing act. it may not want to see Pakistan go down, but it will also act to see that the influence Pakistan has does not give them unmitigated power. So there is some scope for hope that the US will sometimes play a game that is beneficial to India. Exactly how the US can be pressured to play that game is something I am unable to say now. I suspect it will mean destabilizing or putting Pakistan at risk if Pakistan's anti-India actions get exacerbated - forcing the US to step in diplomatically and financially.
What about China. Putting Pakistan in charge of AfPak should be fine for China as long as Uighuristan is not destabilised via the AfPak region. China will look to the Pakistan army to ensure that. The Pakistan army will require to really maintain control over jihadis in Afghanistan. With the US remaining involved with Pakistan - the dynamics of unrestricted Chinese entry into Pakistan will be stymied at best.
Pakistan will be left to stabilize itself and India will be requested to toe the line as Pakistan does that. India's only pound of flesh here will be destabilization of Pakistan if Pakistan does not behave. Given the situation in Pakistan we will continue to see an unstable Pakistan. We will continue to see attempts at infiltration and terror attacks. My main concern is how long the Pakistani army is supported with the latest weapons and money to give them more confidence to act against India.
I believe that a lot of people have misread the utility of nukes to Pakistan.
Nukes in Pakistan have emboldened the Pakistani army to undertake conventional attacks (terrorism) against India knowing that fear of nuclear retaliation will stop India from hitting Pakistan willy nilly. I see no change in that situation. However I do see a need for reducing Pakistan's access to the technology to fight a sophisticated modern war. We will never be able to stop Pakistan from fighting a guerilla, subconventional war. India will have to somehow impress on the west that instability in Pakistan makes it dangerous to supply them with sophisticated arms. China is a different issue and our relationship with China needs to be handled on its own merit. We cannot "philosophically" accept western arms aid to Pakistan on the excuse that they will get it anyway from China.
As long as Pakistan wields a nuclear deterrent (which is forever) Pakistan will remain a threat to India, but reducing its technological ability to fight a conventional war against India will erode the "gap" that Pakistan has between terrorism and nuclear war.
What I am saying may sound counter intuitive. What the US is doing with Pakistan is as follows:
1) Pakistan fears India
2) Pakistan retains terrorist on its side because India is far superior in conventional arms
3) Addressing Pakistan's fear of India can reduce Pakistani instability
4) Making the Pakistani army stronger against India in conventional arms will increase the gap between the use of terrorists as the "low end threat" and the use of nukes as the "high end threat". Pakistan will have a middle order strength of conventional weapons which will hopefully give Pakistan the confidence to stop relying on terrorists.
This line of thinking is completely wrong. Pakistani society is militarized and jihadized. By improving Pakistan's conventional arms strength the US is not making Pakistan rely less on jihadis. Pakistan will never be satisfied by its conventional arms. Pakistan will retain all that conventional strength and still freely use terrorism against India. In addition the conventional arms will pose an extra military threat that will be more difficult for India to handle in case of hot war. If Pakistan manages to chew off a part of Rajasthan, Punjab or Kashmir - it will be that much more difficult for India to reclaim that because of the threat of a nuclear sword of Damocles.
If Pakistan conventional strength is decreased the army will have only two options: terrorism or nukes. Under the circumstances this is the best India can hope for. Unfortunately Pakistan is more intelligent and Chanakyan than the West. Pakistan responds to a situation where it is denied conventional arms and aid by saying that the jihadis are going to take over the nukes. This is a veiled threat to the US and the West that says "
Our nukes, currently aimed at India will end up in the hands of people who may nuke you". The west falls for this consistently. They will never allow the Pakistan army to fail or become weak as long as the Paki army shows that it is
a) In control of nukes
b) Those nukes are aimed at India alone.
As far as I can tell one way out for India (short of losing territory to Pakistan) is to accept the possibility of war with Pakistan with a nuclear exchange in which both India and Pakistan sustain nuclear damage but India manages to come out on top.Whatever the options - India's only option is to become a military superpower even if we continue being a superpower power with more weapons than toilets. We cannot allow the absence of toilets to stop us from threatening everyone. Including China and the US if they act against our interests. e cannot rely on them to act in our interests. The US can hardly do that even if it wanted to - so fcued up is its game.
All the great-game-shate-game business is fluff. IndiaPakistan IS the great game.