The visits extend a string of high-level exchanges as Beijing works to keep pace with Pyongyang’s deepening ties with Moscow.