Beijing's population shrank in 2017-the first time in 17 years-as the result of nonessential functions being relocated outside the city and better urban management, authorities said on Friday.