Sri Lanka’s election upset just destroyed a linchpin of China’s foreign policy