Chinese President Xi Jinping has wrapped up a visit to North Korea, saying the two nations are committed to further deepening ties and safeguarding world peace.