China’s public offer to mediate peace talks between the Taliban and the Afghan government is the first time Beijing is taking a genuine leadership role on a politically sensitive geopolitical issue.