Kim Jong-un is in Beijing for a three-day visit at the invitation of China’s president, state media say.