The population of China’s capital, Beijing, fell for the first time in two decades in 2017, the official Xinhua news agency reported, citing official data.