Virat Kohli's majestic unbeaten century was the backbone of India's six-wicket victory over Pakistan in the Champions Trophy.